{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "5174b8d2-9150-439b-975d-a6aa438e61d1",
   "metadata": {},
   "source": [
    "# pandas4 - Excel类似的功能"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "d00cdb57-2757-4ad6-b9ad-aaf41192debc",
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import pandas as pd\n",
    "import matplotlib.pyplot as plt"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "468f1394-4c54-41ae-9bf2-00159cf37c6d",
   "metadata": {},
   "source": [
    "## 获取统计信息"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "34e862d0-794c-46a7-8fd4-b7146024c29d",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>语文</th>\n",
       "      <th>数学</th>\n",
       "      <th>英语</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>关羽</th>\n",
       "      <td>80</td>\n",
       "      <td>99</td>\n",
       "      <td>64</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>张飞</th>\n",
       "      <td>63</td>\n",
       "      <td>56</td>\n",
       "      <td>55</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>赵云</th>\n",
       "      <td>88</td>\n",
       "      <td>93</td>\n",
       "      <td>62</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>马超</th>\n",
       "      <td>71</td>\n",
       "      <td>60</td>\n",
       "      <td>94</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>黄忠</th>\n",
       "      <td>72</td>\n",
       "      <td>90</td>\n",
       "      <td>87</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    语文  数学  英语\n",
       "关羽  80  99  64\n",
       "张飞  63  56  55\n",
       "赵云  88  93  62\n",
       "马超  71  60  94\n",
       "黄忠  72  90  87"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "scores = np.random.randint(50, 101, (5, 3))\n",
    "names = ('关羽', '张飞', '赵云', '马超', '黄忠')\n",
    "courses = ('语文', '数学', '英语')\n",
    "df = pd.DataFrame(data=scores, columns=courses, index=names)\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "01e4a0fa-768a-47e6-8d7b-3782087ee894",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "语文    74.8\n",
       "数学    79.6\n",
       "英语    72.4\n",
       "dtype: float64"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 均值\n",
    "df.mean()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "9a46ab91-099d-4f5f-9225-1c4ec668a7cf",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "语文     90.7\n",
       "数学    401.3\n",
       "英语    290.3\n",
       "dtype: float64"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 方差\n",
    "df.var()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "1d6b7ca0-64e8-45e8-a995-05220595690b",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>语文</th>\n",
       "      <th>数学</th>\n",
       "      <th>英语</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>count</th>\n",
       "      <td>5.000000</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>5.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>mean</th>\n",
       "      <td>74.800000</td>\n",
       "      <td>79.600000</td>\n",
       "      <td>72.400000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>std</th>\n",
       "      <td>9.523655</td>\n",
       "      <td>20.032474</td>\n",
       "      <td>17.038192</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>min</th>\n",
       "      <td>63.000000</td>\n",
       "      <td>56.000000</td>\n",
       "      <td>55.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25%</th>\n",
       "      <td>71.000000</td>\n",
       "      <td>60.000000</td>\n",
       "      <td>62.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>50%</th>\n",
       "      <td>72.000000</td>\n",
       "      <td>90.000000</td>\n",
       "      <td>64.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>75%</th>\n",
       "      <td>80.000000</td>\n",
       "      <td>93.000000</td>\n",
       "      <td>87.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>max</th>\n",
       "      <td>88.000000</td>\n",
       "      <td>99.000000</td>\n",
       "      <td>94.000000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "              语文         数学         英语\n",
       "count   5.000000   5.000000   5.000000\n",
       "mean   74.800000  79.600000  72.400000\n",
       "std     9.523655  20.032474  17.038192\n",
       "min    63.000000  56.000000  55.000000\n",
       "25%    71.000000  60.000000  62.000000\n",
       "50%    72.000000  90.000000  64.000000\n",
       "75%    80.000000  93.000000  87.000000\n",
       "max    88.000000  99.000000  94.000000"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 统计信息\n",
    "df.describe()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "077061a8-b78e-49e7-b92e-37a3b3889821",
   "metadata": {},
   "source": [
    "## 排序、取头部值"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "1d8586ee-946f-4232-ac11-edd8c84686b1",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>语文</th>\n",
       "      <th>数学</th>\n",
       "      <th>英语</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>赵云</th>\n",
       "      <td>88</td>\n",
       "      <td>93</td>\n",
       "      <td>62</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>关羽</th>\n",
       "      <td>80</td>\n",
       "      <td>99</td>\n",
       "      <td>64</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>黄忠</th>\n",
       "      <td>72</td>\n",
       "      <td>90</td>\n",
       "      <td>87</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>马超</th>\n",
       "      <td>71</td>\n",
       "      <td>60</td>\n",
       "      <td>94</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>张飞</th>\n",
       "      <td>63</td>\n",
       "      <td>56</td>\n",
       "      <td>55</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    语文  数学  英语\n",
       "赵云  88  93  62\n",
       "关羽  80  99  64\n",
       "黄忠  72  90  87\n",
       "马超  71  60  94\n",
       "张飞  63  56  55"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 降序\n",
    "df.sort_values(by='语文', ascending=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "b7a18baf-6810-4ce6-badf-aaa45b6b3b7d",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>语文</th>\n",
       "      <th>数学</th>\n",
       "      <th>英语</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>赵云</th>\n",
       "      <td>88</td>\n",
       "      <td>93</td>\n",
       "      <td>62</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>关羽</th>\n",
       "      <td>80</td>\n",
       "      <td>99</td>\n",
       "      <td>64</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>黄忠</th>\n",
       "      <td>72</td>\n",
       "      <td>90</td>\n",
       "      <td>87</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    语文  数学  英语\n",
       "赵云  88  93  62\n",
       "关羽  80  99  64\n",
       "黄忠  72  90  87"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# TOP K\n",
    "df.nlargest(3, '语文')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "06b6412f-980b-4e6b-92b0-bab82ca55556",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>语文</th>\n",
       "      <th>数学</th>\n",
       "      <th>英语</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>张飞</th>\n",
       "      <td>63</td>\n",
       "      <td>56</td>\n",
       "      <td>55</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>马超</th>\n",
       "      <td>71</td>\n",
       "      <td>60</td>\n",
       "      <td>94</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>黄忠</th>\n",
       "      <td>72</td>\n",
       "      <td>90</td>\n",
       "      <td>87</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    语文  数学  英语\n",
       "张飞  63  56  55\n",
       "马超  71  60  94\n",
       "黄忠  72  90  87"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.nsmallest(3, '数学')"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "ee9f45d3-f2e2-4d8e-a294-8ba01f01903b",
   "metadata": {},
   "source": [
    "## 分组聚合"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "fd10e113-238e-4c75-a57d-106f64156e78",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>销售日期</th>\n",
       "      <th>销售区域</th>\n",
       "      <th>销售渠道</th>\n",
       "      <th>销售订单</th>\n",
       "      <th>品牌</th>\n",
       "      <th>售价</th>\n",
       "      <th>销售数量</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>2020-01-01</td>\n",
       "      <td>上海</td>\n",
       "      <td>拼多多</td>\n",
       "      <td>182894-455</td>\n",
       "      <td>八匹马</td>\n",
       "      <td>99</td>\n",
       "      <td>83</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2020-01-01</td>\n",
       "      <td>上海</td>\n",
       "      <td>抖音</td>\n",
       "      <td>205635-402</td>\n",
       "      <td>八匹马</td>\n",
       "      <td>219</td>\n",
       "      <td>29</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2020-01-01</td>\n",
       "      <td>上海</td>\n",
       "      <td>天猫</td>\n",
       "      <td>205654-021</td>\n",
       "      <td>八匹马</td>\n",
       "      <td>169</td>\n",
       "      <td>85</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>2020-01-01</td>\n",
       "      <td>上海</td>\n",
       "      <td>天猫</td>\n",
       "      <td>205654-519</td>\n",
       "      <td>八匹马</td>\n",
       "      <td>169</td>\n",
       "      <td>14</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>2020-01-01</td>\n",
       "      <td>上海</td>\n",
       "      <td>天猫</td>\n",
       "      <td>377781-010</td>\n",
       "      <td>皮皮虾</td>\n",
       "      <td>249</td>\n",
       "      <td>61</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "        销售日期 销售区域 销售渠道        销售订单   品牌   售价  销售数量\n",
       "0 2020-01-01   上海  拼多多  182894-455  八匹马   99    83\n",
       "1 2020-01-01   上海   抖音  205635-402  八匹马  219    29\n",
       "2 2020-01-01   上海   天猫  205654-021  八匹马  169    85\n",
       "3 2020-01-01   上海   天猫  205654-519  八匹马  169    14\n",
       "4 2020-01-01   上海   天猫  377781-010  皮皮虾  249    61"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = pd.read_excel('data/2020年销售数据.xlsx')\n",
    "df.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "6de324b3-02e7-452f-8aab-b332de2aa7f5",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>销售日期</th>\n",
       "      <th>销售区域</th>\n",
       "      <th>销售渠道</th>\n",
       "      <th>销售订单</th>\n",
       "      <th>品牌</th>\n",
       "      <th>售价</th>\n",
       "      <th>销售数量</th>\n",
       "      <th>销售额</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>2020-01-01</td>\n",
       "      <td>上海</td>\n",
       "      <td>拼多多</td>\n",
       "      <td>182894-455</td>\n",
       "      <td>八匹马</td>\n",
       "      <td>99</td>\n",
       "      <td>83</td>\n",
       "      <td>8217</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2020-01-01</td>\n",
       "      <td>上海</td>\n",
       "      <td>抖音</td>\n",
       "      <td>205635-402</td>\n",
       "      <td>八匹马</td>\n",
       "      <td>219</td>\n",
       "      <td>29</td>\n",
       "      <td>6351</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2020-01-01</td>\n",
       "      <td>上海</td>\n",
       "      <td>天猫</td>\n",
       "      <td>205654-021</td>\n",
       "      <td>八匹马</td>\n",
       "      <td>169</td>\n",
       "      <td>85</td>\n",
       "      <td>14365</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>2020-01-01</td>\n",
       "      <td>上海</td>\n",
       "      <td>天猫</td>\n",
       "      <td>205654-519</td>\n",
       "      <td>八匹马</td>\n",
       "      <td>169</td>\n",
       "      <td>14</td>\n",
       "      <td>2366</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>2020-01-01</td>\n",
       "      <td>上海</td>\n",
       "      <td>天猫</td>\n",
       "      <td>377781-010</td>\n",
       "      <td>皮皮虾</td>\n",
       "      <td>249</td>\n",
       "      <td>61</td>\n",
       "      <td>15189</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "        销售日期 销售区域 销售渠道        销售订单   品牌   售价  销售数量    销售额\n",
       "0 2020-01-01   上海  拼多多  182894-455  八匹马   99    83   8217\n",
       "1 2020-01-01   上海   抖音  205635-402  八匹马  219    29   6351\n",
       "2 2020-01-01   上海   天猫  205654-021  八匹马  169    85  14365\n",
       "3 2020-01-01   上海   天猫  205654-519  八匹马  169    14   2366\n",
       "4 2020-01-01   上海   天猫  377781-010  皮皮虾  249    61  15189"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df['销售额'] = df['售价'] * df['销售数量']\n",
    "df.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "id": "a77787d4-d72f-4f6f-a8c8-148414279aa9",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "销售区域\n",
       "上海    11610489\n",
       "北京    12477717\n",
       "安徽      895463\n",
       "广东     1617949\n",
       "江苏     2304380\n",
       "浙江      687862\n",
       "福建    10178227\n",
       "Name: 销售额, dtype: int64"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 分组聚合\n",
    "df.groupby('销售区域').销售额.sum()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "id": "5034d73f-9552-434c-88ee-74f303706139",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "销售日期\n",
       "1     5409855\n",
       "2     4608455\n",
       "3     4164972\n",
       "4     3996770\n",
       "5     3239005\n",
       "6     2817936\n",
       "7     3501304\n",
       "8     2948189\n",
       "9     2632960\n",
       "10    2375385\n",
       "11    2385283\n",
       "12    1691973\n",
       "Name: 销售额, dtype: int64"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.groupby(df['销售日期'].dt.month).销售额.sum()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "id": "31e5acec-5d66-478d-824e-7d84df0305b8",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "销售区域  销售日期\n",
       "上海    1       1679125\n",
       "      2       1689527\n",
       "      3       1061193\n",
       "      4       1082187\n",
       "      5        841199\n",
       "      6        785404\n",
       "      7        863906\n",
       "      8        734937\n",
       "      9       1107693\n",
       "      10       412108\n",
       "      11       825169\n",
       "      12       528041\n",
       "北京    1       1878234\n",
       "      2       1807787\n",
       "      3       1360666\n",
       "      4       1205989\n",
       "      5        807300\n",
       "      6       1216432\n",
       "      7       1219083\n",
       "      8        645727\n",
       "      9        390077\n",
       "      10       671608\n",
       "      11       678668\n",
       "      12       596146\n",
       "安徽    4        341308\n",
       "      5        554155\n",
       "广东    3        388180\n",
       "      8        469390\n",
       "      9        365191\n",
       "      11       395188\n",
       "江苏    4        537079\n",
       "      7        841032\n",
       "      10       710962\n",
       "      12       215307\n",
       "浙江    3        248354\n",
       "      8        439508\n",
       "福建    1       1852496\n",
       "      2       1111141\n",
       "      3       1106579\n",
       "      4        830207\n",
       "      5       1036351\n",
       "      6        816100\n",
       "      7        577283\n",
       "      8        658627\n",
       "      9        769999\n",
       "      10       580707\n",
       "      11       486258\n",
       "      12       352479\n",
       "Name: 销售额, dtype: int64"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.groupby(['销售区域', df['销售日期'].dt.month]).销售额.sum()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "id": "f296ae60-93cc-4231-aa85-be0cc6507a74",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>sum</th>\n",
       "      <th>max</th>\n",
       "      <th>min</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>销售区域</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>上海</th>\n",
       "      <td>11610489</td>\n",
       "      <td>116303</td>\n",
       "      <td>948</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>北京</th>\n",
       "      <td>12477717</td>\n",
       "      <td>133411</td>\n",
       "      <td>690</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>安徽</th>\n",
       "      <td>895463</td>\n",
       "      <td>68502</td>\n",
       "      <td>1683</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>广东</th>\n",
       "      <td>1617949</td>\n",
       "      <td>120807</td>\n",
       "      <td>990</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>江苏</th>\n",
       "      <td>2304380</td>\n",
       "      <td>114312</td>\n",
       "      <td>1089</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>浙江</th>\n",
       "      <td>687862</td>\n",
       "      <td>90909</td>\n",
       "      <td>3927</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>福建</th>\n",
       "      <td>10178227</td>\n",
       "      <td>87527</td>\n",
       "      <td>897</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "           sum     max   min\n",
       "销售区域                        \n",
       "上海    11610489  116303   948\n",
       "北京    12477717  133411   690\n",
       "安徽      895463   68502  1683\n",
       "广东     1617949  120807   990\n",
       "江苏     2304380  114312  1089\n",
       "浙江      687862   90909  3927\n",
       "福建    10178227   87527   897"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 分组聚合\n",
    "# agg方法调用了sum,max,min这三个函数求和、求最大值和最小值\n",
    "df.groupby('销售区域').销售额.agg(['sum', 'max', 'min'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "id": "8c7eeb53-acab-418a-b653-447d81299bc9",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>销售总额</th>\n",
       "      <th>单笔最高</th>\n",
       "      <th>单笔最低</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>销售区域</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>上海</th>\n",
       "      <td>11610489</td>\n",
       "      <td>116303</td>\n",
       "      <td>948</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>北京</th>\n",
       "      <td>12477717</td>\n",
       "      <td>133411</td>\n",
       "      <td>690</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>安徽</th>\n",
       "      <td>895463</td>\n",
       "      <td>68502</td>\n",
       "      <td>1683</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>广东</th>\n",
       "      <td>1617949</td>\n",
       "      <td>120807</td>\n",
       "      <td>990</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>江苏</th>\n",
       "      <td>2304380</td>\n",
       "      <td>114312</td>\n",
       "      <td>1089</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>浙江</th>\n",
       "      <td>687862</td>\n",
       "      <td>90909</td>\n",
       "      <td>3927</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>福建</th>\n",
       "      <td>10178227</td>\n",
       "      <td>87527</td>\n",
       "      <td>897</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "          销售总额    单笔最高  单笔最低\n",
       "销售区域                        \n",
       "上海    11610489  116303   948\n",
       "北京    12477717  133411   690\n",
       "安徽      895463   68502  1683\n",
       "广东     1617949  120807   990\n",
       "江苏     2304380  114312  1089\n",
       "浙江      687862   90909  3927\n",
       "福建    10178227   87527   897"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 在前面的基础上指定列名\n",
    "df.groupby('销售区域').销售额.agg(销售总额='sum', 单笔最高='max', 单笔最低='min')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "id": "7903b99a-f433-464d-b96d-61b685577c14",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr:last-of-type th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th>销售额</th>\n",
       "      <th colspan=\"2\" halign=\"left\">销售数量</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th>sum</th>\n",
       "      <th>max</th>\n",
       "      <th>min</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>销售区域</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>上海</th>\n",
       "      <td>11610489</td>\n",
       "      <td>100</td>\n",
       "      <td>10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>北京</th>\n",
       "      <td>12477717</td>\n",
       "      <td>100</td>\n",
       "      <td>10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>安徽</th>\n",
       "      <td>895463</td>\n",
       "      <td>98</td>\n",
       "      <td>16</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>广东</th>\n",
       "      <td>1617949</td>\n",
       "      <td>98</td>\n",
       "      <td>10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>江苏</th>\n",
       "      <td>2304380</td>\n",
       "      <td>100</td>\n",
       "      <td>11</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>浙江</th>\n",
       "      <td>687862</td>\n",
       "      <td>95</td>\n",
       "      <td>20</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>福建</th>\n",
       "      <td>10178227</td>\n",
       "      <td>100</td>\n",
       "      <td>10</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "           销售额 销售数量    \n",
       "           sum  max min\n",
       "销售区域                   \n",
       "上海    11610489  100  10\n",
       "北京    12477717  100  10\n",
       "安徽      895463   98  16\n",
       "广东     1617949   98  10\n",
       "江苏     2304380  100  11\n",
       "浙江      687862   95  20\n",
       "福建    10178227  100  10"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.groupby('销售区域')[['销售额', '销售数量']].agg({\n",
    "    '销售额': 'sum', '销售数量': ['max', 'min']\n",
    "})"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "9d8c84f2-d6c0-4013-b9df-636ae1e011ad",
   "metadata": {},
   "source": [
    "## 数据透视表和交叉表"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "id": "e615fd8d-44d6-490c-9318-bb91d53c2f14",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>销售额</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>销售区域</th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>上海</th>\n",
       "      <td>11610489</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>北京</th>\n",
       "      <td>12477717</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>安徽</th>\n",
       "      <td>895463</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>广东</th>\n",
       "      <td>1617949</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>江苏</th>\n",
       "      <td>2304380</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>浙江</th>\n",
       "      <td>687862</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>福建</th>\n",
       "      <td>10178227</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "           销售额\n",
       "销售区域          \n",
       "上海    11610489\n",
       "北京    12477717\n",
       "安徽      895463\n",
       "广东     1617949\n",
       "江苏     2304380\n",
       "浙江      687862\n",
       "福建    10178227"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.pivot_table(df, index='销售区域', values='销售额', aggfunc='sum')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "id": "4a14120a-6d4d-4a32-bd25-80527ecc75ef",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th>销售额</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>销售区域</th>\n",
       "      <th>月份</th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th rowspan=\"12\" valign=\"top\">上海</th>\n",
       "      <th>1</th>\n",
       "      <td>1679125</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>1689527</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>1061193</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>1082187</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>841199</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>785404</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>863906</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>734937</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>1107693</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>412108</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>825169</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>528041</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"12\" valign=\"top\">北京</th>\n",
       "      <th>1</th>\n",
       "      <td>1878234</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>1807787</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>1360666</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>1205989</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>807300</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>1216432</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>1219083</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>645727</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>390077</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>671608</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>678668</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>596146</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"2\" valign=\"top\">安徽</th>\n",
       "      <th>4</th>\n",
       "      <td>341308</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>554155</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"4\" valign=\"top\">广东</th>\n",
       "      <th>3</th>\n",
       "      <td>388180</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>469390</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>365191</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>395188</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"4\" valign=\"top\">江苏</th>\n",
       "      <th>4</th>\n",
       "      <td>537079</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>841032</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>710962</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>215307</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"2\" valign=\"top\">浙江</th>\n",
       "      <th>3</th>\n",
       "      <td>248354</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>439508</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"12\" valign=\"top\">福建</th>\n",
       "      <th>1</th>\n",
       "      <td>1852496</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>1111141</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>1106579</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>830207</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>1036351</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>816100</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>577283</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>658627</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>769999</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>580707</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>486258</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>352479</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "             销售额\n",
       "销售区域 月份         \n",
       "上海   1   1679125\n",
       "     2   1689527\n",
       "     3   1061193\n",
       "     4   1082187\n",
       "     5    841199\n",
       "     6    785404\n",
       "     7    863906\n",
       "     8    734937\n",
       "     9   1107693\n",
       "     10   412108\n",
       "     11   825169\n",
       "     12   528041\n",
       "北京   1   1878234\n",
       "     2   1807787\n",
       "     3   1360666\n",
       "     4   1205989\n",
       "     5    807300\n",
       "     6   1216432\n",
       "     7   1219083\n",
       "     8    645727\n",
       "     9    390077\n",
       "     10   671608\n",
       "     11   678668\n",
       "     12   596146\n",
       "安徽   4    341308\n",
       "     5    554155\n",
       "广东   3    388180\n",
       "     8    469390\n",
       "     9    365191\n",
       "     11   395188\n",
       "江苏   4    537079\n",
       "     7    841032\n",
       "     10   710962\n",
       "     12   215307\n",
       "浙江   3    248354\n",
       "     8    439508\n",
       "福建   1   1852496\n",
       "     2   1111141\n",
       "     3   1106579\n",
       "     4    830207\n",
       "     5   1036351\n",
       "     6    816100\n",
       "     7    577283\n",
       "     8    658627\n",
       "     9    769999\n",
       "     10   580707\n",
       "     11   486258\n",
       "     12   352479"
      ]
     },
     "execution_count": 19,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df['月份'] = df['销售日期'].dt.month\n",
    "pd.pivot_table(df, index=['销售区域', '月份'], values='销售额', aggfunc='sum')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "id": "a553aea6-2a32-415d-be07-d1dd19265ca7",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th>月份</th>\n",
       "      <th>1</th>\n",
       "      <th>2</th>\n",
       "      <th>3</th>\n",
       "      <th>4</th>\n",
       "      <th>5</th>\n",
       "      <th>6</th>\n",
       "      <th>7</th>\n",
       "      <th>8</th>\n",
       "      <th>9</th>\n",
       "      <th>10</th>\n",
       "      <th>11</th>\n",
       "      <th>12</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>销售区域</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>上海</th>\n",
       "      <td>1679125</td>\n",
       "      <td>1689527</td>\n",
       "      <td>1061193</td>\n",
       "      <td>1082187</td>\n",
       "      <td>841199</td>\n",
       "      <td>785404</td>\n",
       "      <td>863906</td>\n",
       "      <td>734937</td>\n",
       "      <td>1107693</td>\n",
       "      <td>412108</td>\n",
       "      <td>825169</td>\n",
       "      <td>528041</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>北京</th>\n",
       "      <td>1878234</td>\n",
       "      <td>1807787</td>\n",
       "      <td>1360666</td>\n",
       "      <td>1205989</td>\n",
       "      <td>807300</td>\n",
       "      <td>1216432</td>\n",
       "      <td>1219083</td>\n",
       "      <td>645727</td>\n",
       "      <td>390077</td>\n",
       "      <td>671608</td>\n",
       "      <td>678668</td>\n",
       "      <td>596146</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>安徽</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>341308</td>\n",
       "      <td>554155</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>广东</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>388180</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>469390</td>\n",
       "      <td>365191</td>\n",
       "      <td>0</td>\n",
       "      <td>395188</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>江苏</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>537079</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>841032</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>710962</td>\n",
       "      <td>0</td>\n",
       "      <td>215307</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>浙江</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>248354</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>439508</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>福建</th>\n",
       "      <td>1852496</td>\n",
       "      <td>1111141</td>\n",
       "      <td>1106579</td>\n",
       "      <td>830207</td>\n",
       "      <td>1036351</td>\n",
       "      <td>816100</td>\n",
       "      <td>577283</td>\n",
       "      <td>658627</td>\n",
       "      <td>769999</td>\n",
       "      <td>580707</td>\n",
       "      <td>486258</td>\n",
       "      <td>352479</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "月份         1        2        3        4        5        6        7       8   \\\n",
       "销售区域                                                                          \n",
       "上海    1679125  1689527  1061193  1082187   841199   785404   863906  734937   \n",
       "北京    1878234  1807787  1360666  1205989   807300  1216432  1219083  645727   \n",
       "安徽          0        0        0   341308   554155        0        0       0   \n",
       "广东          0        0   388180        0        0        0        0  469390   \n",
       "江苏          0        0        0   537079        0        0   841032       0   \n",
       "浙江          0        0   248354        0        0        0        0  439508   \n",
       "福建    1852496  1111141  1106579   830207  1036351   816100   577283  658627   \n",
       "\n",
       "月份         9       10      11      12  \n",
       "销售区域                                   \n",
       "上海    1107693  412108  825169  528041  \n",
       "北京     390077  671608  678668  596146  \n",
       "安徽          0       0       0       0  \n",
       "广东     365191       0  395188       0  \n",
       "江苏          0  710962       0  215307  \n",
       "浙江          0       0       0       0  \n",
       "福建     769999  580707  486258  352479  "
      ]
     },
     "execution_count": 21,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.pivot_table(df, index='销售区域', columns='月份', values='销售额', aggfunc='sum', \n",
    "               fill_value=0) # 缺失值用0填充"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "id": "32d1a410-1765-412b-a736-c951f4f20e6d",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th>月份</th>\n",
       "      <th>1</th>\n",
       "      <th>2</th>\n",
       "      <th>3</th>\n",
       "      <th>4</th>\n",
       "      <th>5</th>\n",
       "      <th>6</th>\n",
       "      <th>7</th>\n",
       "      <th>8</th>\n",
       "      <th>9</th>\n",
       "      <th>10</th>\n",
       "      <th>11</th>\n",
       "      <th>12</th>\n",
       "      <th>总计</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>销售区域</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>上海</th>\n",
       "      <td>1679125</td>\n",
       "      <td>1689527</td>\n",
       "      <td>1061193</td>\n",
       "      <td>1082187</td>\n",
       "      <td>841199</td>\n",
       "      <td>785404</td>\n",
       "      <td>863906</td>\n",
       "      <td>734937</td>\n",
       "      <td>1107693</td>\n",
       "      <td>412108</td>\n",
       "      <td>825169</td>\n",
       "      <td>528041</td>\n",
       "      <td>11610489</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>北京</th>\n",
       "      <td>1878234</td>\n",
       "      <td>1807787</td>\n",
       "      <td>1360666</td>\n",
       "      <td>1205989</td>\n",
       "      <td>807300</td>\n",
       "      <td>1216432</td>\n",
       "      <td>1219083</td>\n",
       "      <td>645727</td>\n",
       "      <td>390077</td>\n",
       "      <td>671608</td>\n",
       "      <td>678668</td>\n",
       "      <td>596146</td>\n",
       "      <td>12477717</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>安徽</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>341308</td>\n",
       "      <td>554155</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>895463</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>广东</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>388180</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>469390</td>\n",
       "      <td>365191</td>\n",
       "      <td>0</td>\n",
       "      <td>395188</td>\n",
       "      <td>0</td>\n",
       "      <td>1617949</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>江苏</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>537079</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>841032</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>710962</td>\n",
       "      <td>0</td>\n",
       "      <td>215307</td>\n",
       "      <td>2304380</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>浙江</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>248354</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>439508</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>687862</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>福建</th>\n",
       "      <td>1852496</td>\n",
       "      <td>1111141</td>\n",
       "      <td>1106579</td>\n",
       "      <td>830207</td>\n",
       "      <td>1036351</td>\n",
       "      <td>816100</td>\n",
       "      <td>577283</td>\n",
       "      <td>658627</td>\n",
       "      <td>769999</td>\n",
       "      <td>580707</td>\n",
       "      <td>486258</td>\n",
       "      <td>352479</td>\n",
       "      <td>10178227</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>总计</th>\n",
       "      <td>5409855</td>\n",
       "      <td>4608455</td>\n",
       "      <td>4164972</td>\n",
       "      <td>3996770</td>\n",
       "      <td>3239005</td>\n",
       "      <td>2817936</td>\n",
       "      <td>3501304</td>\n",
       "      <td>2948189</td>\n",
       "      <td>2632960</td>\n",
       "      <td>2375385</td>\n",
       "      <td>2385283</td>\n",
       "      <td>1691973</td>\n",
       "      <td>39772087</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "月份          1        2        3        4        5        6        7        8  \\\n",
       "销售区域                                                                           \n",
       "上海    1679125  1689527  1061193  1082187   841199   785404   863906   734937   \n",
       "北京    1878234  1807787  1360666  1205989   807300  1216432  1219083   645727   \n",
       "安徽          0        0        0   341308   554155        0        0        0   \n",
       "广东          0        0   388180        0        0        0        0   469390   \n",
       "江苏          0        0        0   537079        0        0   841032        0   \n",
       "浙江          0        0   248354        0        0        0        0   439508   \n",
       "福建    1852496  1111141  1106579   830207  1036351   816100   577283   658627   \n",
       "总计    5409855  4608455  4164972  3996770  3239005  2817936  3501304  2948189   \n",
       "\n",
       "月份          9       10       11       12        总计  \n",
       "销售区域                                                \n",
       "上海    1107693   412108   825169   528041  11610489  \n",
       "北京     390077   671608   678668   596146  12477717  \n",
       "安徽          0        0        0        0    895463  \n",
       "广东     365191        0   395188        0   1617949  \n",
       "江苏          0   710962        0   215307   2304380  \n",
       "浙江          0        0        0        0    687862  \n",
       "福建     769999   580707   486258   352479  10178227  \n",
       "总计    2632960  2375385  2385283  1691973  39772087  "
      ]
     },
     "execution_count": 23,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.pivot_table(df, index='销售区域', columns='月份', values='销售额', aggfunc='sum', fill_value=0, \n",
    "               margins=True, margins_name='总计') # 添加汇总行"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "id": "685023a7-abff-4ad8-ab11-e1f5ab75fdfd",
   "metadata": {},
   "outputs": [],
   "source": [
    "sales_area, sales_month, sales_amount = df['销售区域'], df['月份'], df['销售额']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "id": "9743c21d-5f95-4b41-b7f9-4c84451111f8",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th>月份</th>\n",
       "      <th>1</th>\n",
       "      <th>2</th>\n",
       "      <th>3</th>\n",
       "      <th>4</th>\n",
       "      <th>5</th>\n",
       "      <th>6</th>\n",
       "      <th>7</th>\n",
       "      <th>8</th>\n",
       "      <th>9</th>\n",
       "      <th>10</th>\n",
       "      <th>11</th>\n",
       "      <th>12</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>销售区域</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>上海</th>\n",
       "      <td>1679125</td>\n",
       "      <td>1689527</td>\n",
       "      <td>1061193</td>\n",
       "      <td>1082187</td>\n",
       "      <td>841199</td>\n",
       "      <td>785404</td>\n",
       "      <td>863906</td>\n",
       "      <td>734937</td>\n",
       "      <td>1107693</td>\n",
       "      <td>412108</td>\n",
       "      <td>825169</td>\n",
       "      <td>528041</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>北京</th>\n",
       "      <td>1878234</td>\n",
       "      <td>1807787</td>\n",
       "      <td>1360666</td>\n",
       "      <td>1205989</td>\n",
       "      <td>807300</td>\n",
       "      <td>1216432</td>\n",
       "      <td>1219083</td>\n",
       "      <td>645727</td>\n",
       "      <td>390077</td>\n",
       "      <td>671608</td>\n",
       "      <td>678668</td>\n",
       "      <td>596146</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>安徽</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>341308</td>\n",
       "      <td>554155</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>广东</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>388180</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>469390</td>\n",
       "      <td>365191</td>\n",
       "      <td>0</td>\n",
       "      <td>395188</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>江苏</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>537079</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>841032</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>710962</td>\n",
       "      <td>0</td>\n",
       "      <td>215307</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>浙江</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>248354</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>439508</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>福建</th>\n",
       "      <td>1852496</td>\n",
       "      <td>1111141</td>\n",
       "      <td>1106579</td>\n",
       "      <td>830207</td>\n",
       "      <td>1036351</td>\n",
       "      <td>816100</td>\n",
       "      <td>577283</td>\n",
       "      <td>658627</td>\n",
       "      <td>769999</td>\n",
       "      <td>580707</td>\n",
       "      <td>486258</td>\n",
       "      <td>352479</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "月份         1        2        3        4        5        6        7       8   \\\n",
       "销售区域                                                                          \n",
       "上海    1679125  1689527  1061193  1082187   841199   785404   863906  734937   \n",
       "北京    1878234  1807787  1360666  1205989   807300  1216432  1219083  645727   \n",
       "安徽          0        0        0   341308   554155        0        0       0   \n",
       "广东          0        0   388180        0        0        0        0  469390   \n",
       "江苏          0        0        0   537079        0        0   841032       0   \n",
       "浙江          0        0   248354        0        0        0        0  439508   \n",
       "福建    1852496  1111141  1106579   830207  1036351   816100   577283  658627   \n",
       "\n",
       "月份         9       10      11      12  \n",
       "销售区域                                   \n",
       "上海    1107693  412108  825169  528041  \n",
       "北京     390077  671608  678668  596146  \n",
       "安徽          0       0       0       0  \n",
       "广东     365191       0  395188       0  \n",
       "江苏          0  710962       0  215307  \n",
       "浙江          0       0       0       0  \n",
       "福建     769999  580707  486258  352479  "
      ]
     },
     "execution_count": 26,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.crosstab(index=sales_area, columns=sales_month, values=sales_amount, aggfunc='sum').fillna(0).astype('i8')"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "26430902-328f-4d99-b818-44a580cb478b",
   "metadata": {},
   "source": [
    "## 可视化"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "id": "4be715b2-d874-48d8-9617-26c16eee39ac",
   "metadata": {},
   "outputs": [],
   "source": [
    "# matplotlib设置中文字体\n",
    "plt.rcParams['font.sans-serif'] = 'Microsoft Yahei'"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "id": "de1fc7ac-8cf6-44db-8ef8-a85311268e3b",
   "metadata": {},
   "outputs": [],
   "source": [
    "# 绘制矢量图\n",
    "%config InlineBackend.figure_format = 'svg'"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "id": "3adfe312-0692-458b-9f6f-24f0445b30cc",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/svg+xml": [
       "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n",
       "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
       "  \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
       "<svg xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"481.935937pt\" height=\"279.113125pt\" viewBox=\"0 0 481.935937 279.113125\" xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\">\n",
       " <metadata>\n",
       "  <rdf:RDF xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:cc=\"http://creativecommons.org/ns#\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\n",
       "   <cc:Work>\n",
       "    <dc:type rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\"/>\n",
       "    <dc:date>2025-12-08T12:59:16.128122</dc:date>\n",
       "    <dc:format>image/svg+xml</dc:format>\n",
       "    <dc:creator>\n",
       "     <cc:Agent>\n",
       "      <dc:title>Matplotlib v3.10.7, https://matplotlib.org/</dc:title>\n",
       "     </cc:Agent>\n",
       "    </dc:creator>\n",
       "   </cc:Work>\n",
       "  </rdf:RDF>\n",
       " </metadata>\n",
       " <defs>\n",
       "  <style type=\"text/css\">*{stroke-linejoin: round; stroke-linecap: butt}</style>\n",
       " </defs>\n",
       " <g id=\"figure_1\">\n",
       "  <g id=\"patch_1\">\n",
       "   <path d=\"M 0 279.113125 \n",
       "L 481.935937 279.113125 \n",
       "L 481.935937 0 \n",
       "L 0 0 \n",
       "z\n",
       "\" style=\"fill: #ffffff\"/>\n",
       "  </g>\n",
       "  <g id=\"axes_1\">\n",
       "   <g id=\"patch_2\">\n",
       "    <path d=\"M 28.335938 239.95375 \n",
       "L 474.735937 239.95375 \n",
       "L 474.735937 18.19375 \n",
       "L 28.335938 18.19375 \n",
       "z\n",
       "\" style=\"fill: #ffffff\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_3\">\n",
       "    <path d=\"M 44.278795 239.95375 \n",
       "L 76.164509 239.95375 \n",
       "L 76.164509 43.432601 \n",
       "L 44.278795 43.432601 \n",
       "z\n",
       "\" clip-path=\"url(#p4d09b13892)\" style=\"fill: #1f77b4\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_4\">\n",
       "    <path d=\"M 108.050223 239.95375 \n",
       "L 139.935937 239.95375 \n",
       "L 139.935937 28.75375 \n",
       "L 108.050223 28.75375 \n",
       "z\n",
       "\" clip-path=\"url(#p4d09b13892)\" style=\"fill: #1f77b4\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_5\">\n",
       "    <path d=\"M 171.821652 239.95375 \n",
       "L 203.707366 239.95375 \n",
       "L 203.707366 224.796988 \n",
       "L 171.821652 224.796988 \n",
       "z\n",
       "\" clip-path=\"url(#p4d09b13892)\" style=\"fill: #1f77b4\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_6\">\n",
       "    <path d=\"M 235.59308 239.95375 \n",
       "L 267.478795 239.95375 \n",
       "L 267.478795 212.568065 \n",
       "L 235.59308 212.568065 \n",
       "z\n",
       "\" clip-path=\"url(#p4d09b13892)\" style=\"fill: #1f77b4\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_7\">\n",
       "    <path d=\"M 299.364509 239.95375 \n",
       "L 331.250223 239.95375 \n",
       "L 331.250223 200.949415 \n",
       "L 299.364509 200.949415 \n",
       "z\n",
       "\" clip-path=\"url(#p4d09b13892)\" style=\"fill: #1f77b4\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_8\">\n",
       "    <path d=\"M 363.135938 239.95375 \n",
       "L 395.021652 239.95375 \n",
       "L 395.021652 228.310879 \n",
       "L 363.135938 228.310879 \n",
       "z\n",
       "\" clip-path=\"url(#p4d09b13892)\" style=\"fill: #1f77b4\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_9\">\n",
       "    <path d=\"M 426.907366 239.95375 \n",
       "L 458.79308 239.95375 \n",
       "L 458.79308 67.675316 \n",
       "L 426.907366 67.675316 \n",
       "z\n",
       "\" clip-path=\"url(#p4d09b13892)\" style=\"fill: #1f77b4\"/>\n",
       "   </g>\n",
       "   <g id=\"matplotlib.axis_1\">\n",
       "    <g id=\"xtick_1\">\n",
       "     <g id=\"line2d_1\">\n",
       "      <defs>\n",
       "       <path id=\"m15513ef7f8\" d=\"M 0 0 \n",
       "L 0 3.5 \n",
       "\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </defs>\n",
       "      <g>\n",
       "       <use xlink:href=\"#m15513ef7f8\" x=\"60.221652\" y=\"239.95375\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_1\">\n",
       "      <!-- 上海 -->\n",
       "      <g transform=\"translate(50.221652 254.9475) scale(0.1 -0.1)\">\n",
       "       <defs>\n",
       "        <path id=\"MicrosoftYaHei-4e0a\" d=\"M 163 47 \n",
       "L 2613 47 \n",
       "L 2613 5209 \n",
       "L 3181 5209 \n",
       "L 3181 3328 \n",
       "L 5750 3328 \n",
       "L 5750 2828 \n",
       "L 3181 2828 \n",
       "L 3181 47 \n",
       "L 6244 47 \n",
       "L 6244 -453 \n",
       "L 163 -453 \n",
       "L 163 47 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "        <path id=\"MicrosoftYaHei-6d77\" d=\"M 1475 2191 \n",
       "L 2116 2191 \n",
       "L 2338 3753 \n",
       "L 5706 3753 \n",
       "Q 5688 2884 5669 2191 \n",
       "L 6325 2191 \n",
       "L 6325 1753 \n",
       "L 5653 1753 \n",
       "Q 5634 1078 5616 603 \n",
       "L 6125 603 \n",
       "L 6125 178 \n",
       "L 5588 178 \n",
       "Q 5534 -281 5338 -509 \n",
       "Q 5113 -766 4538 -766 \n",
       "Q 4213 -766 3700 -741 \n",
       "Q 3669 -528 3613 -234 \n",
       "Q 4219 -291 4544 -291 \n",
       "Q 5016 -291 5106 178 \n",
       "L 1894 178 \n",
       "L 1894 641 \n",
       "L 2053 1753 \n",
       "L 1475 1753 \n",
       "L 1475 2191 \n",
       "z\n",
       "M 5184 1753 \n",
       "L 2541 1753 \n",
       "L 2388 603 \n",
       "L 5141 603 \n",
       "Q 5166 1116 5184 1753 \n",
       "z\n",
       "M 5225 3328 \n",
       "L 2750 3328 \n",
       "L 2597 2191 \n",
       "L 5197 2191 \n",
       "Q 5213 2722 5225 3328 \n",
       "z\n",
       "M 1425 3553 \n",
       "Q 2200 4284 2675 5347 \n",
       "L 3206 5347 \n",
       "Q 3056 5022 2891 4728 \n",
       "L 6194 4728 \n",
       "L 6194 4291 \n",
       "L 2628 4291 \n",
       "Q 2225 3663 1744 3184 \n",
       "Q 1600 3372 1425 3553 \n",
       "z\n",
       "M 275 -653 \n",
       "Q 644 441 913 1741 \n",
       "Q 1188 1622 1419 1547 \n",
       "Q 1100 322 825 -822 \n",
       "L 275 -653 \n",
       "z\n",
       "M 88 3253 \n",
       "L 400 3609 \n",
       "Q 975 3209 1469 2803 \n",
       "Q 1244 2547 1106 2403 \n",
       "Q 550 2903 88 3253 \n",
       "z\n",
       "M 325 4916 \n",
       "L 644 5247 \n",
       "Q 1019 4959 1688 4378 \n",
       "Q 1475 4172 1319 4009 \n",
       "Q 644 4653 325 4916 \n",
       "z\n",
       "M 3288 1372 \n",
       "L 3575 1653 \n",
       "Q 3994 1334 4356 1009 \n",
       "L 4031 684 \n",
       "Q 3663 1041 3288 1372 \n",
       "z\n",
       "M 3369 2972 \n",
       "L 3650 3253 \n",
       "Q 4050 2947 4438 2616 \n",
       "L 4119 2291 \n",
       "Q 3738 2666 3369 2972 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       </defs>\n",
       "       <use xlink:href=\"#MicrosoftYaHei-4e0a\"/>\n",
       "       <use xlink:href=\"#MicrosoftYaHei-6d77\" transform=\"translate(100 0)\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"xtick_2\">\n",
       "     <g id=\"line2d_2\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m15513ef7f8\" x=\"123.99308\" y=\"239.95375\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_2\">\n",
       "      <!-- 北京 -->\n",
       "      <g transform=\"translate(113.99308 254.9475) scale(0.1 -0.1)\">\n",
       "       <defs>\n",
       "        <path id=\"MicrosoftYaHei-5317\" d=\"M 3763 5247 \n",
       "L 4269 5247 \n",
       "L 4269 3131 \n",
       "Q 5122 3569 5863 4091 \n",
       "L 6175 3641 \n",
       "Q 5500 3216 4269 2600 \n",
       "L 4269 303 \n",
       "Q 4269 -122 4738 -122 \n",
       "L 5175 -122 \n",
       "Q 5625 -122 5681 303 \n",
       "Q 5738 697 5781 1328 \n",
       "Q 6056 1216 6313 1128 \n",
       "Q 6250 534 6175 116 \n",
       "Q 6056 -597 5294 -597 \n",
       "L 4619 -597 \n",
       "Q 3763 -597 3763 247 \n",
       "L 3763 5247 \n",
       "z\n",
       "M 81 309 \n",
       "Q 897 591 2013 1047 \n",
       "L 2013 3016 \n",
       "L 213 3016 \n",
       "L 213 3478 \n",
       "L 2013 3478 \n",
       "L 2013 5234 \n",
       "L 2519 5234 \n",
       "L 2519 -772 \n",
       "L 2013 -772 \n",
       "L 2013 525 \n",
       "Q 1413 281 281 -184 \n",
       "L 81 309 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "        <path id=\"MicrosoftYaHei-4eac\" d=\"M 963 3459 \n",
       "L 5431 3459 \n",
       "L 5431 1347 \n",
       "L 4944 1347 \n",
       "L 4944 1597 \n",
       "L 3506 1597 \n",
       "L 3506 9 \n",
       "Q 3506 -731 2800 -741 \n",
       "Q 2350 -741 1981 -741 \n",
       "Q 1938 -472 1888 -234 \n",
       "Q 2306 -272 2613 -272 \n",
       "Q 3006 -284 3006 134 \n",
       "L 3006 1597 \n",
       "L 1450 1597 \n",
       "L 1450 1316 \n",
       "L 963 1316 \n",
       "L 963 3459 \n",
       "z\n",
       "M 4944 3028 \n",
       "L 1450 3028 \n",
       "L 1450 2028 \n",
       "L 4944 2028 \n",
       "L 4944 3028 \n",
       "z\n",
       "M 150 4453 \n",
       "L 3038 4453 \n",
       "Q 2859 4784 2631 5134 \n",
       "L 3088 5359 \n",
       "Q 3338 4984 3575 4584 \n",
       "L 3325 4453 \n",
       "L 6263 4453 \n",
       "L 6263 4016 \n",
       "L 150 4016 \n",
       "L 150 4453 \n",
       "z\n",
       "M 1756 1072 \n",
       "L 2100 697 \n",
       "Q 1263 66 419 -459 \n",
       "Q 300 -247 131 -41 \n",
       "Q 988 453 1756 1072 \n",
       "z\n",
       "M 4181 653 \n",
       "L 4475 1028 \n",
       "Q 5331 522 6119 3 \n",
       "L 5788 -428 \n",
       "Q 5125 66 4181 653 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       </defs>\n",
       "       <use xlink:href=\"#MicrosoftYaHei-5317\"/>\n",
       "       <use xlink:href=\"#MicrosoftYaHei-4eac\" transform=\"translate(100 0)\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"xtick_3\">\n",
       "     <g id=\"line2d_3\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m15513ef7f8\" x=\"187.764509\" y=\"239.95375\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_3\">\n",
       "      <!-- 安徽 -->\n",
       "      <g transform=\"translate(177.764509 254.9475) scale(0.1 -0.1)\">\n",
       "       <defs>\n",
       "        <path id=\"MicrosoftYaHei-5b89\" d=\"M 325 -322 \n",
       "Q 1894 -81 2888 478 \n",
       "Q 2072 859 1163 1266 \n",
       "Q 1459 1709 1747 2191 \n",
       "L 106 2191 \n",
       "L 106 2653 \n",
       "L 2019 2653 \n",
       "Q 2334 3206 2644 3803 \n",
       "L 3138 3597 \n",
       "Q 2863 3113 2597 2653 \n",
       "L 6306 2653 \n",
       "L 6306 2191 \n",
       "L 4966 2191 \n",
       "Q 4653 1244 3888 572 \n",
       "Q 4872 128 5850 -328 \n",
       "L 5544 -828 \n",
       "Q 4591 -328 3434 219 \n",
       "Q 2347 -513 588 -834 \n",
       "Q 475 -597 325 -322 \n",
       "z\n",
       "M 413 4397 \n",
       "L 3228 4397 \n",
       "Q 2991 4741 2681 5103 \n",
       "L 3100 5384 \n",
       "Q 3481 4972 3744 4591 \n",
       "L 3456 4397 \n",
       "L 6013 4397 \n",
       "L 6013 3209 \n",
       "L 5506 3209 \n",
       "L 5506 3934 \n",
       "L 913 3934 \n",
       "L 913 3209 \n",
       "L 413 3209 \n",
       "L 413 4397 \n",
       "z\n",
       "M 1881 1453 \n",
       "Q 2631 1131 3375 800 \n",
       "Q 4122 1369 4422 2191 \n",
       "L 2325 2191 \n",
       "Q 2100 1813 1881 1453 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "        <path id=\"MicrosoftYaHei-5fbd\" d=\"M 4850 5303 \n",
       "L 5263 5234 \n",
       "Q 5163 4650 5022 4122 \n",
       "L 6313 4122 \n",
       "L 6313 3716 \n",
       "L 6016 3716 \n",
       "Q 5884 1847 5438 819 \n",
       "Q 5788 113 6338 -378 \n",
       "Q 6175 -628 6063 -822 \n",
       "Q 5544 -297 5200 356 \n",
       "Q 4828 -278 4225 -872 \n",
       "Q 4106 -691 3938 -484 \n",
       "Q 4609 163 4978 844 \n",
       "Q 4628 1719 4556 2791 \n",
       "Q 4419 2478 4263 2197 \n",
       "Q 4144 2397 4006 2584 \n",
       "Q 4594 3653 4850 5303 \n",
       "z\n",
       "M 2206 2216 \n",
       "Q 2481 2216 3066 2238 \n",
       "Q 3316 2472 3519 2709 \n",
       "L 3881 2459 \n",
       "Q 3044 1703 2331 1234 \n",
       "Q 3056 1263 3653 1294 \n",
       "Q 3547 1466 3438 1628 \n",
       "L 3769 1809 \n",
       "Q 4075 1384 4356 891 \n",
       "L 4006 678 \n",
       "Q 3928 825 3847 969 \n",
       "Q 3516 950 3181 928 \n",
       "L 3181 -103 \n",
       "Q 3181 -741 2600 -741 \n",
       "Q 2375 -741 2069 -734 \n",
       "Q 2044 -572 1988 -291 \n",
       "Q 2256 -328 2469 -328 \n",
       "Q 2756 -328 2769 3 \n",
       "L 2769 900 \n",
       "Q 2409 878 2044 853 \n",
       "Q 1913 847 1713 809 \n",
       "L 1556 1191 \n",
       "Q 1744 1253 1838 1309 \n",
       "Q 2300 1603 2678 1906 \n",
       "Q 2350 1891 2013 1859 \n",
       "Q 1938 1853 1731 1809 \n",
       "L 1563 2197 \n",
       "Q 1725 2241 1863 2359 \n",
       "Q 2144 2588 2456 2934 \n",
       "L 1725 2934 \n",
       "L 1725 3297 \n",
       "L 4100 3297 \n",
       "L 4100 2934 \n",
       "L 2991 2934 \n",
       "Q 2538 2491 2206 2216 \n",
       "z\n",
       "M 50 1653 \n",
       "Q 694 2372 1288 3647 \n",
       "L 1663 3453 \n",
       "Q 1413 2959 1181 2547 \n",
       "L 1181 -841 \n",
       "L 756 -841 \n",
       "L 756 1844 \n",
       "Q 494 1441 250 1153 \n",
       "Q 163 1397 50 1653 \n",
       "z\n",
       "M 1819 3697 \n",
       "L 1819 4909 \n",
       "L 2219 4909 \n",
       "L 2219 4059 \n",
       "L 2756 4059 \n",
       "L 2756 5278 \n",
       "L 3156 5278 \n",
       "L 3156 4059 \n",
       "L 3694 4059 \n",
       "L 3694 4909 \n",
       "L 4094 4909 \n",
       "L 4094 3509 \n",
       "L 3694 3509 \n",
       "L 3694 3697 \n",
       "L 1819 3697 \n",
       "z\n",
       "M 5209 1369 \n",
       "Q 5497 2188 5603 3716 \n",
       "L 4903 3716 \n",
       "Q 4875 3619 4844 3525 \n",
       "Q 4888 2297 5209 1369 \n",
       "z\n",
       "M 50 3584 \n",
       "Q 788 4322 1288 5297 \n",
       "L 1675 5078 \n",
       "Q 1031 3934 275 3159 \n",
       "Q 175 3384 50 3584 \n",
       "z\n",
       "M 1944 703 \n",
       "L 2306 516 \n",
       "Q 2019 -3 1719 -434 \n",
       "Q 1581 -328 1381 -209 \n",
       "Q 1688 191 1944 703 \n",
       "z\n",
       "M 3419 491 \n",
       "L 3725 722 \n",
       "Q 4000 409 4275 41 \n",
       "L 3950 -209 \n",
       "Q 3656 216 3419 491 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       </defs>\n",
       "       <use xlink:href=\"#MicrosoftYaHei-5b89\"/>\n",
       "       <use xlink:href=\"#MicrosoftYaHei-5fbd\" transform=\"translate(100 0)\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"xtick_4\">\n",
       "     <g id=\"line2d_4\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m15513ef7f8\" x=\"251.535937\" y=\"239.95375\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_4\">\n",
       "      <!-- 广东 -->\n",
       "      <g transform=\"translate(241.535937 254.9475) scale(0.1 -0.1)\">\n",
       "       <defs>\n",
       "        <path id=\"MicrosoftYaHei-5e7f\" d=\"M 975 4384 \n",
       "L 3466 4384 \n",
       "Q 3291 4684 3000 5097 \n",
       "L 3456 5359 \n",
       "Q 3763 4966 4000 4591 \n",
       "L 3650 4384 \n",
       "L 6213 4384 \n",
       "L 6213 3878 \n",
       "L 1531 3878 \n",
       "L 1531 2328 \n",
       "Q 1538 366 513 -797 \n",
       "Q 369 -641 63 -403 \n",
       "Q 975 591 975 2391 \n",
       "L 975 4384 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "        <path id=\"MicrosoftYaHei-4e1c\" d=\"M 706 1884 \n",
       "L 706 2359 \n",
       "L 1422 4022 \n",
       "L 194 4022 \n",
       "L 194 4497 \n",
       "L 1625 4497 \n",
       "L 1994 5353 \n",
       "L 2531 5241 \n",
       "L 2206 4497 \n",
       "L 6206 4497 \n",
       "L 6206 4022 \n",
       "L 2000 4022 \n",
       "L 1275 2359 \n",
       "L 3156 2359 \n",
       "L 3156 3728 \n",
       "L 3681 3728 \n",
       "L 3681 2359 \n",
       "L 5913 2359 \n",
       "L 5913 1884 \n",
       "L 3681 1884 \n",
       "L 3681 41 \n",
       "Q 3681 -741 2869 -741 \n",
       "Q 2456 -741 1931 -734 \n",
       "Q 1894 -491 1838 -172 \n",
       "Q 2250 -225 2725 -228 \n",
       "Q 3156 -231 3156 216 \n",
       "L 3156 1884 \n",
       "L 706 1884 \n",
       "z\n",
       "M 1619 1509 \n",
       "L 2038 1191 \n",
       "Q 1325 353 413 -534 \n",
       "Q 250 -359 56 -184 \n",
       "Q 888 603 1619 1509 \n",
       "z\n",
       "M 4288 1091 \n",
       "L 4638 1434 \n",
       "Q 5500 722 6363 -59 \n",
       "L 5975 -453 \n",
       "Q 5119 391 4288 1091 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       </defs>\n",
       "       <use xlink:href=\"#MicrosoftYaHei-5e7f\"/>\n",
       "       <use xlink:href=\"#MicrosoftYaHei-4e1c\" transform=\"translate(100 0)\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"xtick_5\">\n",
       "     <g id=\"line2d_5\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m15513ef7f8\" x=\"315.307366\" y=\"239.95375\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_5\">\n",
       "      <!-- 江苏 -->\n",
       "      <g transform=\"translate(305.307366 254.9475) scale(0.1 -0.1)\">\n",
       "       <defs>\n",
       "        <path id=\"MicrosoftYaHei-6c5f\" d=\"M 1781 97 \n",
       "L 3781 97 \n",
       "L 3781 4228 \n",
       "L 2156 4228 \n",
       "L 2156 4691 \n",
       "L 6038 4691 \n",
       "L 6038 4228 \n",
       "L 4306 4228 \n",
       "L 4306 97 \n",
       "L 6313 97 \n",
       "L 6313 -366 \n",
       "L 1781 -366 \n",
       "L 1781 97 \n",
       "z\n",
       "M 1169 1803 \n",
       "Q 1419 1641 1681 1509 \n",
       "Q 1231 391 800 -816 \n",
       "L 269 -516 \n",
       "Q 763 522 1169 1803 \n",
       "z\n",
       "M 394 3616 \n",
       "Q 1031 3228 1650 2772 \n",
       "L 1300 2316 \n",
       "Q 675 2828 94 3209 \n",
       "L 394 3616 \n",
       "z\n",
       "M 713 5209 \n",
       "Q 1294 4816 1919 4316 \n",
       "L 1581 3891 \n",
       "Q 994 4416 406 4847 \n",
       "L 713 5209 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "        <path id=\"MicrosoftYaHei-82cf\" d=\"M 550 3041 \n",
       "L 2447 3041 \n",
       "Q 2466 3372 2463 3741 \n",
       "L 2981 3741 \n",
       "Q 2975 3372 2953 3041 \n",
       "L 5075 3041 \n",
       "Q 5050 1228 4981 366 \n",
       "Q 4881 -684 3856 -684 \n",
       "Q 3306 -684 2738 -659 \n",
       "Q 2713 -422 2650 -78 \n",
       "L 2669 -78 \n",
       "Q 3338 -153 3800 -153 \n",
       "Q 4406 -153 4481 509 \n",
       "Q 4544 1328 4550 2547 \n",
       "L 2909 2547 \n",
       "Q 2788 153 581 -872 \n",
       "Q 431 -647 263 -441 \n",
       "Q 2213 391 2406 2547 \n",
       "L 550 2547 \n",
       "L 550 3041 \n",
       "z\n",
       "M 4175 5328 \n",
       "L 4675 5328 \n",
       "L 4675 4591 \n",
       "L 6256 4591 \n",
       "L 6256 4147 \n",
       "L 4675 4147 \n",
       "L 4675 3553 \n",
       "L 4175 3553 \n",
       "L 4175 4147 \n",
       "L 2244 4147 \n",
       "L 2244 3553 \n",
       "L 1756 3553 \n",
       "L 1756 4147 \n",
       "L 138 4147 \n",
       "L 138 4591 \n",
       "L 1756 4591 \n",
       "L 1756 5328 \n",
       "L 2244 5328 \n",
       "L 2244 4591 \n",
       "L 4175 4591 \n",
       "L 4175 5328 \n",
       "z\n",
       "M 5156 2122 \n",
       "L 5663 2316 \n",
       "Q 6031 1553 6344 653 \n",
       "L 5844 447 \n",
       "Q 5494 1397 5156 2122 \n",
       "z\n",
       "M 1056 2266 \n",
       "L 1494 2003 \n",
       "Q 1050 1191 481 428 \n",
       "Q 306 566 75 734 \n",
       "Q 631 1478 1056 2266 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       </defs>\n",
       "       <use xlink:href=\"#MicrosoftYaHei-6c5f\"/>\n",
       "       <use xlink:href=\"#MicrosoftYaHei-82cf\" transform=\"translate(100 0)\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"xtick_6\">\n",
       "     <g id=\"line2d_6\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m15513ef7f8\" x=\"379.078795\" y=\"239.95375\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_6\">\n",
       "      <!-- 浙江 -->\n",
       "      <g transform=\"translate(369.078795 254.9475) scale(0.1 -0.1)\">\n",
       "       <defs>\n",
       "        <path id=\"MicrosoftYaHei-6d59\" d=\"M 3700 4834 \n",
       "Q 5125 4859 6050 5066 \n",
       "L 6194 4603 \n",
       "Q 5300 4466 4163 4409 \n",
       "L 4163 2972 \n",
       "L 6263 2972 \n",
       "L 6263 2522 \n",
       "L 5538 2522 \n",
       "L 5538 -878 \n",
       "L 5081 -878 \n",
       "L 5081 2522 \n",
       "L 4163 2522 \n",
       "Q 4163 178 3419 -884 \n",
       "Q 3200 -722 2988 -597 \n",
       "Q 3700 284 3700 2284 \n",
       "L 3700 4834 \n",
       "z\n",
       "M 1438 1966 \n",
       "Q 1863 2084 2269 2203 \n",
       "L 2269 3647 \n",
       "L 1525 3647 \n",
       "L 1525 4084 \n",
       "L 2269 4084 \n",
       "L 2269 5266 \n",
       "L 2731 5266 \n",
       "L 2731 4084 \n",
       "L 3463 4084 \n",
       "L 3463 3647 \n",
       "L 2731 3647 \n",
       "L 2731 2347 \n",
       "Q 3088 2459 3431 2572 \n",
       "Q 3438 2291 3469 2084 \n",
       "Q 3081 1959 2731 1847 \n",
       "L 2731 -166 \n",
       "Q 2731 -759 2075 -772 \n",
       "Q 1806 -772 1394 -766 \n",
       "Q 1363 -503 1313 -253 \n",
       "Q 1800 -291 2019 -291 \n",
       "Q 2269 -291 2269 -34 \n",
       "L 2269 1691 \n",
       "Q 1850 1553 1500 1428 \n",
       "L 1438 1966 \n",
       "z\n",
       "M 913 1753 \n",
       "Q 1175 1616 1406 1522 \n",
       "Q 1038 203 781 -797 \n",
       "L 269 -559 \n",
       "Q 644 491 913 1753 \n",
       "z\n",
       "M 388 3553 \n",
       "Q 919 3134 1406 2709 \n",
       "L 1038 2316 \n",
       "Q 650 2697 75 3209 \n",
       "L 388 3553 \n",
       "z\n",
       "M 675 5159 \n",
       "Q 1175 4759 1650 4322 \n",
       "L 1281 3953 \n",
       "Q 850 4416 356 4853 \n",
       "L 675 5159 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       </defs>\n",
       "       <use xlink:href=\"#MicrosoftYaHei-6d59\"/>\n",
       "       <use xlink:href=\"#MicrosoftYaHei-6c5f\" transform=\"translate(100 0)\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"xtick_7\">\n",
       "     <g id=\"line2d_7\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m15513ef7f8\" x=\"442.850223\" y=\"239.95375\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_7\">\n",
       "      <!-- 福建 -->\n",
       "      <g transform=\"translate(432.850223 254.9475) scale(0.1 -0.1)\">\n",
       "       <defs>\n",
       "        <path id=\"MicrosoftYaHei-798f\" d=\"M 2338 2166 \n",
       "L 5988 2166 \n",
       "L 5988 -778 \n",
       "L 5538 -778 \n",
       "L 5538 -466 \n",
       "L 2788 -466 \n",
       "L 2788 -778 \n",
       "L 2338 -778 \n",
       "L 2338 2166 \n",
       "z\n",
       "M 2631 4147 \n",
       "L 5681 4147 \n",
       "L 5681 2484 \n",
       "L 5231 2484 \n",
       "L 5231 2703 \n",
       "L 3081 2703 \n",
       "L 3081 2484 \n",
       "L 2631 2484 \n",
       "L 2631 4147 \n",
       "z\n",
       "M 175 3647 \n",
       "L 175 4103 \n",
       "L 2175 4103 \n",
       "L 2175 3634 \n",
       "Q 1853 3016 1419 2459 \n",
       "L 1419 2172 \n",
       "L 1725 2409 \n",
       "Q 1938 2159 2244 1728 \n",
       "L 1888 1447 \n",
       "Q 1628 1847 1419 2134 \n",
       "L 1419 -772 \n",
       "L 969 -772 \n",
       "L 969 1928 \n",
       "Q 638 1572 256 1241 \n",
       "Q 156 1691 94 1791 \n",
       "Q 1144 2609 1625 3647 \n",
       "L 175 3647 \n",
       "z\n",
       "M 2313 5022 \n",
       "L 6088 5022 \n",
       "L 6088 4622 \n",
       "L 2313 4622 \n",
       "L 2313 5022 \n",
       "z\n",
       "M 5231 3772 \n",
       "L 3081 3772 \n",
       "L 3081 3078 \n",
       "L 5231 3078 \n",
       "L 5231 3772 \n",
       "z\n",
       "M 4381 -78 \n",
       "L 5538 -78 \n",
       "L 5538 659 \n",
       "L 4381 659 \n",
       "L 4381 -78 \n",
       "z\n",
       "M 5538 1778 \n",
       "L 4381 1778 \n",
       "L 4381 1047 \n",
       "L 5538 1047 \n",
       "L 5538 1778 \n",
       "z\n",
       "M 2788 -78 \n",
       "L 3931 -78 \n",
       "L 3931 659 \n",
       "L 2788 659 \n",
       "L 2788 -78 \n",
       "z\n",
       "M 2788 1047 \n",
       "L 3931 1047 \n",
       "L 3931 1778 \n",
       "L 2788 1778 \n",
       "L 2788 1047 \n",
       "z\n",
       "M 731 5141 \n",
       "L 1175 5359 \n",
       "Q 1356 5072 1681 4497 \n",
       "L 1206 4259 \n",
       "Q 938 4809 731 5141 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "        <path id=\"MicrosoftYaHei-5efa\" d=\"M 2075 1009 \n",
       "L 3675 1009 \n",
       "L 3675 1553 \n",
       "L 2288 1553 \n",
       "L 2288 1928 \n",
       "L 3675 1928 \n",
       "L 3675 2472 \n",
       "L 2375 2472 \n",
       "L 2375 2847 \n",
       "L 3675 2847 \n",
       "L 3675 3391 \n",
       "L 2050 3391 \n",
       "L 2050 3778 \n",
       "L 3675 3778 \n",
       "L 3675 4322 \n",
       "L 2375 4322 \n",
       "L 2375 4697 \n",
       "L 3675 4697 \n",
       "L 3675 5309 \n",
       "L 4138 5309 \n",
       "L 4138 4697 \n",
       "L 5588 4697 \n",
       "L 5588 3778 \n",
       "L 6244 3778 \n",
       "L 6244 3391 \n",
       "L 5588 3391 \n",
       "L 5588 2303 \n",
       "L 5138 2303 \n",
       "L 5138 2472 \n",
       "L 4138 2472 \n",
       "L 4138 1928 \n",
       "L 5713 1928 \n",
       "L 5713 1553 \n",
       "L 4138 1553 \n",
       "L 4138 1009 \n",
       "L 6000 1009 \n",
       "L 6000 634 \n",
       "L 4138 634 \n",
       "L 4138 -9 \n",
       "L 3675 -9 \n",
       "L 3675 634 \n",
       "L 2075 634 \n",
       "L 2075 1009 \n",
       "z\n",
       "M 600 2066 \n",
       "Q 788 1303 1125 813 \n",
       "Q 1459 1500 1544 2397 \n",
       "L 294 2397 \n",
       "L 294 2853 \n",
       "L 1444 4272 \n",
       "L 169 4272 \n",
       "L 169 4697 \n",
       "L 2019 4697 \n",
       "L 2019 4272 \n",
       "L 844 2822 \n",
       "L 2013 2822 \n",
       "L 2013 2453 \n",
       "Q 1897 1294 1447 444 \n",
       "Q 2128 -147 3563 -153 \n",
       "Q 4750 -178 6319 -122 \n",
       "Q 6213 -378 6113 -616 \n",
       "Q 4681 -609 3344 -603 \n",
       "Q 1950 -603 1206 47 \n",
       "Q 853 -466 350 -847 \n",
       "Q 250 -666 94 -441 \n",
       "Q 563 -84 881 391 \n",
       "Q 463 922 188 1909 \n",
       "L 600 2066 \n",
       "z\n",
       "M 4138 2847 \n",
       "L 5138 2847 \n",
       "L 5138 3391 \n",
       "L 4138 3391 \n",
       "L 4138 2847 \n",
       "z\n",
       "M 5138 4322 \n",
       "L 4138 4322 \n",
       "L 4138 3778 \n",
       "L 5138 3778 \n",
       "L 5138 4322 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       </defs>\n",
       "       <use xlink:href=\"#MicrosoftYaHei-798f\"/>\n",
       "       <use xlink:href=\"#MicrosoftYaHei-5efa\" transform=\"translate(100 0)\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"text_8\">\n",
       "     <!-- 销售区域 -->\n",
       "     <g transform=\"translate(231.535937 269.427187) scale(0.1 -0.1)\">\n",
       "      <defs>\n",
       "       <path id=\"MicrosoftYaHei-9500\" d=\"M 2981 -841 \n",
       "L 2525 -841 \n",
       "L 2525 3534 \n",
       "L 3956 3534 \n",
       "L 3956 5309 \n",
       "L 4438 5309 \n",
       "L 4438 3534 \n",
       "L 5931 3534 \n",
       "L 5931 -91 \n",
       "Q 5931 -816 5250 -816 \n",
       "Q 4900 -816 4256 -797 \n",
       "Q 4219 -566 4169 -284 \n",
       "Q 4756 -322 5063 -322 \n",
       "Q 5475 -322 5475 28 \n",
       "L 5475 622 \n",
       "L 2981 622 \n",
       "L 2981 -841 \n",
       "z\n",
       "M 2275 541 \n",
       "Q 2275 266 2306 22 \n",
       "Q 1906 -172 1375 -491 \n",
       "Q 1263 -553 1113 -703 \n",
       "L 781 -272 \n",
       "Q 981 -91 981 197 \n",
       "L 981 1559 \n",
       "L 144 1559 \n",
       "L 144 1991 \n",
       "L 981 1991 \n",
       "L 981 2834 \n",
       "L 575 2834 \n",
       "L 575 3266 \n",
       "L 2169 3266 \n",
       "L 2169 2834 \n",
       "L 1438 2834 \n",
       "L 1438 1991 \n",
       "L 2313 1991 \n",
       "L 2313 1559 \n",
       "L 1438 1559 \n",
       "L 1438 72 \n",
       "Q 1894 316 2275 541 \n",
       "z\n",
       "M 2981 1072 \n",
       "L 5475 1072 \n",
       "L 5475 1847 \n",
       "L 2981 1847 \n",
       "L 2981 1072 \n",
       "z\n",
       "M 5475 3066 \n",
       "L 2981 3066 \n",
       "L 2981 2297 \n",
       "L 5475 2297 \n",
       "L 5475 3066 \n",
       "z\n",
       "M 88 3384 \n",
       "Q 694 4253 1056 5316 \n",
       "L 1525 5159 \n",
       "Q 1356 4741 1163 4353 \n",
       "L 2319 4353 \n",
       "L 2319 3922 \n",
       "L 944 3922 \n",
       "Q 669 3416 350 2959 \n",
       "Q 231 3184 88 3384 \n",
       "z\n",
       "M 4825 4041 \n",
       "Q 5269 4522 5688 5103 \n",
       "L 6100 4791 \n",
       "Q 5719 4328 5163 3747 \n",
       "L 4825 4041 \n",
       "z\n",
       "M 2319 4859 \n",
       "L 2663 5122 \n",
       "Q 3113 4678 3550 4122 \n",
       "L 3156 3803 \n",
       "Q 2725 4409 2319 4859 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       <path id=\"MicrosoftYaHei-552e\" d=\"M 3100 5147 \n",
       "L 3500 5384 \n",
       "Q 3775 5028 3994 4703 \n",
       "L 3756 4559 \n",
       "L 6044 4559 \n",
       "L 6044 4172 \n",
       "L 3825 4172 \n",
       "L 3825 3722 \n",
       "L 5850 3722 \n",
       "L 5850 3334 \n",
       "L 3825 3334 \n",
       "L 3825 2884 \n",
       "L 5850 2884 \n",
       "L 5850 2497 \n",
       "L 3825 2497 \n",
       "L 3825 2034 \n",
       "L 6169 2034 \n",
       "L 6169 1647 \n",
       "L 1319 1647 \n",
       "L 1319 1403 \n",
       "L 856 1403 \n",
       "L 856 3522 \n",
       "Q 600 3222 331 2953 \n",
       "Q 206 3147 38 3347 \n",
       "Q 969 4216 1500 5341 \n",
       "L 1950 5178 \n",
       "Q 1775 4853 1594 4559 \n",
       "L 3494 4559 \n",
       "Q 3319 4847 3100 5147 \n",
       "z\n",
       "M 869 1159 \n",
       "L 5594 1159 \n",
       "L 5594 -853 \n",
       "L 5131 -853 \n",
       "L 5131 -534 \n",
       "L 1331 -534 \n",
       "L 1331 -853 \n",
       "L 869 -853 \n",
       "L 869 1159 \n",
       "z\n",
       "M 5131 759 \n",
       "L 1331 759 \n",
       "L 1331 -134 \n",
       "L 5131 -134 \n",
       "L 5131 759 \n",
       "z\n",
       "M 1319 2034 \n",
       "L 3363 2034 \n",
       "L 3363 2497 \n",
       "L 1319 2497 \n",
       "L 1319 2034 \n",
       "z\n",
       "M 1319 2884 \n",
       "L 3363 2884 \n",
       "L 3363 3334 \n",
       "L 1319 3334 \n",
       "L 1319 2884 \n",
       "z\n",
       "M 1319 3722 \n",
       "L 3363 3722 \n",
       "L 3363 4172 \n",
       "L 1344 4172 \n",
       "L 1319 4134 \n",
       "L 1319 3722 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       <path id=\"MicrosoftYaHei-533a\" d=\"M 600 4872 \n",
       "L 5975 4872 \n",
       "L 5975 4384 \n",
       "L 1131 4384 \n",
       "L 1131 22 \n",
       "L 6075 22 \n",
       "L 6075 -453 \n",
       "L 600 -453 \n",
       "L 600 4872 \n",
       "z\n",
       "M 1613 3697 \n",
       "L 1963 4028 \n",
       "Q 2744 3384 3597 2616 \n",
       "Q 4250 3322 4850 4153 \n",
       "L 5306 3847 \n",
       "Q 4650 2997 3975 2272 \n",
       "Q 4753 1563 5588 753 \n",
       "L 5156 316 \n",
       "Q 4400 1106 3600 1878 \n",
       "Q 2697 963 1763 266 \n",
       "Q 1613 459 1363 672 \n",
       "Q 2344 1341 3228 2231 \n",
       "Q 2444 2972 1613 3697 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       <path id=\"MicrosoftYaHei-57df\" d=\"M 3231 -522 \n",
       "Q 3941 63 4484 841 \n",
       "Q 4269 1816 4219 3803 \n",
       "L 2025 3803 \n",
       "L 2025 4241 \n",
       "L 4206 4241 \n",
       "Q 4197 4747 4194 5328 \n",
       "L 4675 5328 \n",
       "Q 4669 4759 4675 4241 \n",
       "L 6219 4241 \n",
       "L 6219 3803 \n",
       "L 4684 3803 \n",
       "Q 4716 2384 4853 1419 \n",
       "Q 5300 2191 5606 3122 \n",
       "L 6050 2934 \n",
       "Q 5572 1691 4981 763 \n",
       "Q 5113 269 5313 -41 \n",
       "Q 5481 -309 5600 -309 \n",
       "Q 5713 -309 5756 -41 \n",
       "Q 5813 284 5844 934 \n",
       "Q 6113 828 6313 772 \n",
       "Q 6225 34 6163 -272 \n",
       "Q 6056 -822 5656 -828 \n",
       "Q 5350 -822 5088 -522 \n",
       "Q 4828 -234 4647 275 \n",
       "Q 4169 -372 3625 -834 \n",
       "Q 3450 -684 3231 -522 \n",
       "z\n",
       "M 69 441 \n",
       "Q 478 566 875 697 \n",
       "L 875 3141 \n",
       "L 138 3141 \n",
       "L 138 3578 \n",
       "L 875 3578 \n",
       "L 875 5316 \n",
       "L 1338 5316 \n",
       "L 1338 3578 \n",
       "L 2031 3578 \n",
       "L 2031 3141 \n",
       "L 1338 3141 \n",
       "L 1338 853 \n",
       "Q 1666 966 1988 1084 \n",
       "Q 1988 1016 2031 622 \n",
       "Q 1156 303 188 -66 \n",
       "L 69 441 \n",
       "z\n",
       "M 2175 3103 \n",
       "L 3769 3103 \n",
       "L 3769 1159 \n",
       "L 3338 1159 \n",
       "L 3338 1303 \n",
       "L 2606 1303 \n",
       "L 2606 1084 \n",
       "L 2175 1084 \n",
       "L 2175 3103 \n",
       "z\n",
       "M 1694 353 \n",
       "Q 2825 528 3981 766 \n",
       "Q 3975 666 4006 341 \n",
       "Q 3081 172 1856 -84 \n",
       "L 1694 353 \n",
       "z\n",
       "M 3338 2703 \n",
       "L 2606 2703 \n",
       "L 2606 1703 \n",
       "L 3338 1703 \n",
       "L 3338 2703 \n",
       "z\n",
       "M 5188 5241 \n",
       "Q 5650 4916 5931 4666 \n",
       "L 5644 4334 \n",
       "Q 5363 4603 4919 4953 \n",
       "L 5188 5241 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "      </defs>\n",
       "      <use xlink:href=\"#MicrosoftYaHei-9500\"/>\n",
       "      <use xlink:href=\"#MicrosoftYaHei-552e\" transform=\"translate(100 0)\"/>\n",
       "      <use xlink:href=\"#MicrosoftYaHei-533a\" transform=\"translate(200 0)\"/>\n",
       "      <use xlink:href=\"#MicrosoftYaHei-57df\" transform=\"translate(300 0)\"/>\n",
       "     </g>\n",
       "    </g>\n",
       "   </g>\n",
       "   <g id=\"matplotlib.axis_2\">\n",
       "    <g id=\"ytick_1\">\n",
       "     <g id=\"line2d_8\">\n",
       "      <defs>\n",
       "       <path id=\"m0872ddb213\" d=\"M 0 0 \n",
       "L -3.5 0 \n",
       "\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </defs>\n",
       "      <g>\n",
       "       <use xlink:href=\"#m0872ddb213\" x=\"28.335938\" y=\"239.95375\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_9\">\n",
       "      <!-- 0.0 -->\n",
       "      <g transform=\"translate(7.2 243.950625) scale(0.1 -0.1)\">\n",
       "       <defs>\n",
       "        <path id=\"MicrosoftYaHei-30\" d=\"M 284 2325 \n",
       "Q 284 3606 709 4264 \n",
       "Q 1134 4922 1941 4922 \n",
       "Q 3478 4922 3478 2441 \n",
       "Q 3478 1216 3045 567 \n",
       "Q 2613 -81 1831 -81 \n",
       "Q 1094 -81 689 534 \n",
       "Q 284 1150 284 2325 \n",
       "z\n",
       "M 909 2353 \n",
       "Q 909 425 1888 425 \n",
       "Q 2850 425 2850 2384 \n",
       "Q 2850 4413 1906 4413 \n",
       "Q 909 4413 909 2353 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "        <path id=\"MicrosoftYaHei-2e\" d=\"M 372 322 \n",
       "Q 372 491 487 606 \n",
       "Q 603 722 775 722 \n",
       "Q 950 722 1065 605 \n",
       "Q 1181 488 1181 322 \n",
       "Q 1181 159 1065 42 \n",
       "Q 950 -75 772 -75 \n",
       "Q 600 -75 486 42 \n",
       "Q 372 159 372 322 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       </defs>\n",
       "       <use xlink:href=\"#MicrosoftYaHei-30\"/>\n",
       "       <use xlink:href=\"#MicrosoftYaHei-2e\" transform=\"translate(58.642578 0)\"/>\n",
       "       <use xlink:href=\"#MicrosoftYaHei-30\" transform=\"translate(82.714844 0)\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_2\">\n",
       "     <g id=\"line2d_9\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m0872ddb213\" x=\"28.335938\" y=\"206.101403\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_10\">\n",
       "      <!-- 0.2 -->\n",
       "      <g transform=\"translate(7.2 210.098278) scale(0.1 -0.1)\">\n",
       "       <defs>\n",
       "        <path id=\"MicrosoftYaHei-32\" d=\"M 2666 3572 \n",
       "Q 2666 3963 2419 4186 \n",
       "Q 2172 4409 1747 4409 \n",
       "Q 1447 4409 1140 4256 \n",
       "Q 834 4103 569 3819 \n",
       "L 569 4413 \n",
       "Q 806 4659 1107 4790 \n",
       "Q 1409 4922 1816 4922 \n",
       "Q 2472 4922 2872 4570 \n",
       "Q 3272 4219 3272 3619 \n",
       "Q 3272 3084 3026 2693 \n",
       "Q 2781 2303 2188 1894 \n",
       "Q 1581 1475 1376 1294 \n",
       "Q 1172 1113 1090 947 \n",
       "Q 1009 781 1009 544 \n",
       "L 3416 544 \n",
       "L 3416 0 \n",
       "L 372 0 \n",
       "L 372 241 \n",
       "Q 372 659 486 951 \n",
       "Q 600 1244 862 1520 \n",
       "Q 1125 1797 1681 2184 \n",
       "Q 2250 2584 2458 2886 \n",
       "Q 2666 3188 2666 3572 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       </defs>\n",
       "       <use xlink:href=\"#MicrosoftYaHei-30\"/>\n",
       "       <use xlink:href=\"#MicrosoftYaHei-2e\" transform=\"translate(58.642578 0)\"/>\n",
       "       <use xlink:href=\"#MicrosoftYaHei-32\" transform=\"translate(82.714844 0)\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_3\">\n",
       "     <g id=\"line2d_10\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m0872ddb213\" x=\"28.335938\" y=\"172.249057\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_11\">\n",
       "      <!-- 0.4 -->\n",
       "      <g transform=\"translate(7.2 176.245932) scale(0.1 -0.1)\">\n",
       "       <defs>\n",
       "        <path id=\"MicrosoftYaHei-34\" d=\"M 2906 4841 \n",
       "L 2906 1644 \n",
       "L 3631 1644 \n",
       "L 3631 1138 \n",
       "L 2906 1138 \n",
       "L 2906 0 \n",
       "L 2313 0 \n",
       "L 2313 1138 \n",
       "L 53 1138 \n",
       "L 53 1616 \n",
       "Q 656 2294 1265 3178 \n",
       "Q 1875 4063 2272 4841 \n",
       "L 2906 4841 \n",
       "z\n",
       "M 741 1644 \n",
       "L 2313 1644 \n",
       "L 2313 3950 \n",
       "Q 1988 3366 1616 2817 \n",
       "Q 1244 2269 741 1644 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       </defs>\n",
       "       <use xlink:href=\"#MicrosoftYaHei-30\"/>\n",
       "       <use xlink:href=\"#MicrosoftYaHei-2e\" transform=\"translate(58.642578 0)\"/>\n",
       "       <use xlink:href=\"#MicrosoftYaHei-34\" transform=\"translate(82.714844 0)\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_4\">\n",
       "     <g id=\"line2d_11\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m0872ddb213\" x=\"28.335938\" y=\"138.39671\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_12\">\n",
       "      <!-- 0.6 -->\n",
       "      <g transform=\"translate(7.2 142.393585) scale(0.1 -0.1)\">\n",
       "       <defs>\n",
       "        <path id=\"MicrosoftYaHei-36\" d=\"M 3181 4219 \n",
       "Q 2803 4413 2391 4413 \n",
       "Q 1763 4413 1381 3866 \n",
       "Q 1000 3319 994 2372 \n",
       "L 1009 2372 \n",
       "Q 1353 3038 2106 3038 \n",
       "Q 2734 3038 3109 2628 \n",
       "Q 3484 2219 3484 1541 \n",
       "Q 3484 831 3051 375 \n",
       "Q 2619 -81 1947 -81 \n",
       "Q 1209 -81 789 495 \n",
       "Q 369 1072 369 2131 \n",
       "Q 369 3413 920 4167 \n",
       "Q 1472 4922 2372 4922 \n",
       "Q 2888 4922 3181 4781 \n",
       "L 3181 4219 \n",
       "z\n",
       "M 1031 1584 \n",
       "Q 1031 1106 1286 765 \n",
       "Q 1541 425 1963 425 \n",
       "Q 2363 425 2613 719 \n",
       "Q 2863 1013 2863 1475 \n",
       "Q 2863 1975 2627 2253 \n",
       "Q 2391 2531 1956 2531 \n",
       "Q 1544 2531 1287 2250 \n",
       "Q 1031 1969 1031 1584 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       </defs>\n",
       "       <use xlink:href=\"#MicrosoftYaHei-30\"/>\n",
       "       <use xlink:href=\"#MicrosoftYaHei-2e\" transform=\"translate(58.642578 0)\"/>\n",
       "       <use xlink:href=\"#MicrosoftYaHei-36\" transform=\"translate(82.714844 0)\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_5\">\n",
       "     <g id=\"line2d_12\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m0872ddb213\" x=\"28.335938\" y=\"104.544364\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_13\">\n",
       "      <!-- 0.8 -->\n",
       "      <g transform=\"translate(7.2 108.541239) scale(0.1 -0.1)\">\n",
       "       <defs>\n",
       "        <path id=\"MicrosoftYaHei-38\" d=\"M 306 1350 \n",
       "Q 306 1769 556 2122 \n",
       "Q 806 2475 1200 2625 \n",
       "Q 884 2803 700 3081 \n",
       "Q 516 3359 516 3684 \n",
       "Q 516 4028 692 4312 \n",
       "Q 869 4597 1183 4759 \n",
       "Q 1497 4922 1875 4922 \n",
       "Q 2256 4922 2572 4761 \n",
       "Q 2888 4600 3063 4315 \n",
       "Q 3238 4031 3238 3684 \n",
       "Q 3238 3366 3058 3086 \n",
       "Q 2878 2806 2559 2625 \n",
       "Q 2953 2472 3200 2119 \n",
       "Q 3447 1766 3447 1350 \n",
       "Q 3447 938 3250 611 \n",
       "Q 3053 284 2690 103 \n",
       "Q 2328 -78 1875 -78 \n",
       "Q 1425 -78 1065 103 \n",
       "Q 706 284 506 612 \n",
       "Q 306 941 306 1350 \n",
       "z\n",
       "M 906 1378 \n",
       "Q 906 947 1172 687 \n",
       "Q 1438 428 1878 428 \n",
       "Q 2309 428 2582 692 \n",
       "Q 2856 956 2856 1378 \n",
       "Q 2856 1778 2579 2051 \n",
       "Q 2303 2325 1878 2325 \n",
       "Q 1456 2325 1181 2058 \n",
       "Q 906 1791 906 1378 \n",
       "z\n",
       "M 1081 3634 \n",
       "Q 1081 3309 1312 3076 \n",
       "Q 1544 2844 1878 2844 \n",
       "Q 2206 2844 2445 3078 \n",
       "Q 2684 3313 2684 3634 \n",
       "Q 2684 3963 2454 4191 \n",
       "Q 2225 4419 1878 4419 \n",
       "Q 1534 4419 1307 4195 \n",
       "Q 1081 3972 1081 3634 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       </defs>\n",
       "       <use xlink:href=\"#MicrosoftYaHei-30\"/>\n",
       "       <use xlink:href=\"#MicrosoftYaHei-2e\" transform=\"translate(58.642578 0)\"/>\n",
       "       <use xlink:href=\"#MicrosoftYaHei-38\" transform=\"translate(82.714844 0)\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_6\">\n",
       "     <g id=\"line2d_13\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m0872ddb213\" x=\"28.335938\" y=\"70.692017\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_14\">\n",
       "      <!-- 1.0 -->\n",
       "      <g transform=\"translate(7.2 74.688892) scale(0.1 -0.1)\">\n",
       "       <defs>\n",
       "        <path id=\"MicrosoftYaHei-31\" d=\"M 1781 0 \n",
       "L 1781 4141 \n",
       "Q 1638 3997 1295 3819 \n",
       "Q 953 3641 663 3569 \n",
       "L 663 4169 \n",
       "Q 1047 4275 1484 4508 \n",
       "Q 1922 4741 2156 4947 \n",
       "L 2388 4947 \n",
       "L 2388 0 \n",
       "L 1781 0 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       </defs>\n",
       "       <use xlink:href=\"#MicrosoftYaHei-31\"/>\n",
       "       <use xlink:href=\"#MicrosoftYaHei-2e\" transform=\"translate(58.642578 0)\"/>\n",
       "       <use xlink:href=\"#MicrosoftYaHei-30\" transform=\"translate(82.714844 0)\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_7\">\n",
       "     <g id=\"line2d_14\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m0872ddb213\" x=\"28.335938\" y=\"36.839671\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_15\">\n",
       "      <!-- 1.2 -->\n",
       "      <g transform=\"translate(7.2 40.836546) scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#MicrosoftYaHei-31\"/>\n",
       "       <use xlink:href=\"#MicrosoftYaHei-2e\" transform=\"translate(58.642578 0)\"/>\n",
       "       <use xlink:href=\"#MicrosoftYaHei-32\" transform=\"translate(82.714844 0)\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"text_16\">\n",
       "     <!-- 1e7 -->\n",
       "     <g transform=\"translate(28.335938 15.19375) scale(0.1 -0.1)\">\n",
       "      <defs>\n",
       "       <path id=\"MicrosoftYaHei-65\" d=\"M 3363 1572 \n",
       "L 944 1572 \n",
       "Q 959 1019 1246 717 \n",
       "Q 1534 416 2050 416 \n",
       "Q 2631 416 3116 788 \n",
       "L 3116 241 \n",
       "Q 2659 -81 1906 -81 \n",
       "Q 1156 -81 736 394 \n",
       "Q 316 869 316 1713 \n",
       "Q 316 2506 777 3022 \n",
       "Q 1238 3538 1922 3538 \n",
       "Q 2600 3538 2981 3102 \n",
       "Q 3363 2666 3363 1881 \n",
       "L 3363 1572 \n",
       "z\n",
       "M 2750 2063 \n",
       "Q 2747 2531 2528 2787 \n",
       "Q 2309 3044 1913 3044 \n",
       "Q 1547 3044 1280 2772 \n",
       "Q 1013 2500 944 2063 \n",
       "L 2750 2063 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       <path id=\"MicrosoftYaHei-37\" d=\"M 3422 4463 \n",
       "Q 2659 3131 2223 1998 \n",
       "Q 1788 866 1684 0 \n",
       "L 1047 0 \n",
       "Q 1163 853 1594 1947 \n",
       "Q 2025 3041 2747 4300 \n",
       "L 347 4300 \n",
       "L 347 4841 \n",
       "L 3422 4841 \n",
       "L 3422 4463 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "      </defs>\n",
       "      <use xlink:href=\"#MicrosoftYaHei-31\"/>\n",
       "      <use xlink:href=\"#MicrosoftYaHei-65\" transform=\"translate(58.642578 0)\"/>\n",
       "      <use xlink:href=\"#MicrosoftYaHei-37\" transform=\"translate(115.380859 0)\"/>\n",
       "     </g>\n",
       "    </g>\n",
       "   </g>\n",
       "   <g id=\"patch_10\">\n",
       "    <path d=\"M 28.335938 239.95375 \n",
       "L 28.335938 18.19375 \n",
       "\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_11\">\n",
       "    <path d=\"M 474.735937 239.95375 \n",
       "L 474.735937 18.19375 \n",
       "\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_12\">\n",
       "    <path d=\"M 28.335938 239.95375 \n",
       "L 474.735937 239.95375 \n",
       "\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_13\">\n",
       "    <path d=\"M 28.335938 18.19375 \n",
       "L 474.735937 18.19375 \n",
       "\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"legend_1\">\n",
       "    <g id=\"patch_14\">\n",
       "     <path d=\"M 405.735937 41.673437 \n",
       "L 467.735937 41.673437 \n",
       "Q 469.735937 41.673437 469.735937 39.673437 \n",
       "L 469.735937 25.19375 \n",
       "Q 469.735937 23.19375 467.735937 23.19375 \n",
       "L 405.735937 23.19375 \n",
       "Q 403.735937 23.19375 403.735937 25.19375 \n",
       "L 403.735937 39.673437 \n",
       "Q 403.735937 41.673437 405.735937 41.673437 \n",
       "z\n",
       "\" style=\"fill: #ffffff; opacity: 0.8; stroke: #cccccc; stroke-linejoin: miter\"/>\n",
       "    </g>\n",
       "    <g id=\"patch_15\">\n",
       "     <path d=\"M 407.735937 35.1875 \n",
       "L 427.735937 35.1875 \n",
       "L 427.735937 28.1875 \n",
       "L 407.735937 28.1875 \n",
       "z\n",
       "\" style=\"fill: #1f77b4\"/>\n",
       "    </g>\n",
       "    <g id=\"text_17\">\n",
       "     <!-- 销售额 -->\n",
       "     <g transform=\"translate(435.735937 35.1875) scale(0.1 -0.1)\">\n",
       "      <defs>\n",
       "       <path id=\"MicrosoftYaHei-989d\" d=\"M 863 2484 \n",
       "L 1094 2834 \n",
       "Q 1463 2653 1794 2491 \n",
       "Q 2119 2809 2344 3203 \n",
       "L 1125 3203 \n",
       "Q 794 2659 419 2247 \n",
       "Q 281 2397 125 2547 \n",
       "Q 719 3172 1100 4072 \n",
       "L 1513 3934 \n",
       "Q 1425 3747 1331 3578 \n",
       "L 2844 3578 \n",
       "L 2844 3222 \n",
       "Q 2588 2703 2194 2291 \n",
       "Q 2738 2016 3194 1778 \n",
       "L 2938 1372 \n",
       "Q 2406 1678 1850 1978 \n",
       "Q 1381 1597 763 1322 \n",
       "L 2756 1322 \n",
       "L 2756 -684 \n",
       "L 2344 -684 \n",
       "L 2344 -416 \n",
       "L 1063 -416 \n",
       "L 1063 -734 \n",
       "L 650 -734 \n",
       "L 650 1272 \n",
       "Q 463 1197 269 1128 \n",
       "Q 188 1297 63 1509 \n",
       "Q 869 1766 1444 2191 \n",
       "Q 1156 2334 863 2484 \n",
       "z\n",
       "M 3369 3728 \n",
       "L 4281 3728 \n",
       "L 4425 4516 \n",
       "L 3244 4516 \n",
       "L 3244 4941 \n",
       "L 6231 4941 \n",
       "L 6231 4516 \n",
       "L 4906 4516 \n",
       "L 4738 3728 \n",
       "L 6038 3728 \n",
       "L 6038 591 \n",
       "L 5600 591 \n",
       "L 5600 3303 \n",
       "L 3806 3303 \n",
       "L 3806 591 \n",
       "L 3369 591 \n",
       "L 3369 3728 \n",
       "z\n",
       "M 4481 2916 \n",
       "L 4931 2916 \n",
       "Q 4944 1322 4788 709 \n",
       "Q 5688 78 6356 -453 \n",
       "L 6044 -853 \n",
       "Q 5438 -303 4619 291 \n",
       "Q 4231 -416 3169 -916 \n",
       "Q 3044 -734 2869 -516 \n",
       "Q 4019 -3 4294 716 \n",
       "Q 4519 1216 4481 2916 \n",
       "z\n",
       "M 250 4591 \n",
       "L 1538 4591 \n",
       "Q 1413 4872 1244 5172 \n",
       "L 1650 5347 \n",
       "Q 1881 4916 2031 4591 \n",
       "L 3138 4591 \n",
       "L 3138 3709 \n",
       "L 2713 3709 \n",
       "L 2713 4216 \n",
       "L 675 4216 \n",
       "L 675 3709 \n",
       "L 250 3709 \n",
       "L 250 4591 \n",
       "z\n",
       "M 2344 934 \n",
       "L 1063 934 \n",
       "L 1063 -28 \n",
       "L 2344 -28 \n",
       "L 2344 934 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "      </defs>\n",
       "      <use xlink:href=\"#MicrosoftYaHei-9500\"/>\n",
       "      <use xlink:href=\"#MicrosoftYaHei-552e\" transform=\"translate(100 0)\"/>\n",
       "      <use xlink:href=\"#MicrosoftYaHei-989d\" transform=\"translate(200 0)\"/>\n",
       "     </g>\n",
       "    </g>\n",
       "   </g>\n",
       "  </g>\n",
       " </g>\n",
       " <defs>\n",
       "  <clipPath id=\"p4d09b13892\">\n",
       "   <rect x=\"28.335938\" y=\"18.19375\" width=\"446.4\" height=\"221.76\"/>\n",
       "  </clipPath>\n",
       " </defs>\n",
       "</svg>\n"
      ],
      "text/plain": [
       "<Figure size 800x400 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "temp = pd.pivot_table(df, index='销售区域', values='销售额', aggfunc='sum')\n",
    "temp.plot(figsize=(8, 4), kind='bar')\n",
    "plt.xticks(rotation=0)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "id": "dcb1b60d-c74b-426a-97d5-d9d67ec17ac9",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/svg+xml": [
       "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n",
       "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
       "  \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
       "<svg xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"347.04pt\" height=\"347.04pt\" viewBox=\"0 0 347.04 347.04\" xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\">\n",
       " <metadata>\n",
       "  <rdf:RDF xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:cc=\"http://creativecommons.org/ns#\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\n",
       "   <cc:Work>\n",
       "    <dc:type rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\"/>\n",
       "    <dc:date>2025-12-08T12:59:44.184401</dc:date>\n",
       "    <dc:format>image/svg+xml</dc:format>\n",
       "    <dc:creator>\n",
       "     <cc:Agent>\n",
       "      <dc:title>Matplotlib v3.10.7, https://matplotlib.org/</dc:title>\n",
       "     </cc:Agent>\n",
       "    </dc:creator>\n",
       "   </cc:Work>\n",
       "  </rdf:RDF>\n",
       " </metadata>\n",
       " <defs>\n",
       "  <style type=\"text/css\">*{stroke-linejoin: round; stroke-linecap: butt}</style>\n",
       " </defs>\n",
       " <g id=\"figure_1\">\n",
       "  <g id=\"patch_1\">\n",
       "   <path d=\"M 0 347.04 \n",
       "L 347.04 347.04 \n",
       "L 347.04 -0 \n",
       "L 0 -0 \n",
       "z\n",
       "\" style=\"fill: #ffffff\"/>\n",
       "  </g>\n",
       "  <g id=\"axes_1\">\n",
       "   <g id=\"patch_2\">\n",
       "    <path d=\"M 306.576 173.52 \n",
       "C 306.576 151.553055 301.136035 129.924203 290.743462 110.571138 \n",
       "C 280.350889 91.218074 265.325612 74.736523 247.013723 62.603041 \n",
       "C 228.701833 50.469559 207.667008 43.057639 185.793721 41.031303 \n",
       "C 163.920435 39.004967 141.881993 42.426589 121.652782 50.989633 \n",
       "L 139.806308 93.875261 \n",
       "C 152.955295 88.309283 167.280283 86.085228 181.497919 87.402347 \n",
       "C 195.715555 88.719465 209.388192 93.537213 221.29092 101.423976 \n",
       "C 233.193648 109.31074 242.960078 120.023748 249.71525 132.60324 \n",
       "C 256.470423 145.182732 260.0064 159.241486 260.0064 173.52 \n",
       "z\n",
       "\" style=\"fill: #1f77b4\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_3\">\n",
       "    <path d=\"M 121.652787 50.989627 \n",
       "C 102.842129 58.952193 86.115301 71.140504 72.772574 86.607079 \n",
       "C 59.429847 102.073655 49.826201 120.407048 44.708207 140.182018 \n",
       "C 39.590221 159.956986 39.094025 180.647461 43.258219 200.645028 \n",
       "C 47.422405 220.642595 56.13618 239.415237 68.722171 255.503623 \n",
       "L 105.401411 226.809355 \n",
       "C 97.220517 216.351904 91.556563 204.149687 88.849843 191.151268 \n",
       "C 86.143117 178.15285 86.465644 164.704041 89.792335 151.850312 \n",
       "C 93.119031 138.996581 99.3614 127.079876 108.034173 117.026601 \n",
       "C 116.706946 106.973327 127.579384 99.050926 139.806311 93.875258 \n",
       "z\n",
       "\" style=\"fill: #ff7f0e\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_4\">\n",
       "    <path d=\"M 68.722171 255.503623 \n",
       "C 79.744509 269.593237 93.495924 281.316361 109.152167 289.970338 \n",
       "C 124.808411 298.624315 142.050294 304.032702 159.844355 305.871337 \n",
       "C 177.638417 307.709971 195.621884 305.941349 212.716852 300.671505 \n",
       "C 229.811821 295.401661 245.669764 286.738016 259.340182 275.199869 \n",
       "L 229.303118 239.611915 \n",
       "C 220.417346 247.11171 210.109684 252.743079 198.997954 256.168478 \n",
       "C 187.886224 259.593877 176.196971 260.743481 164.630831 259.548369 \n",
       "C 153.064691 258.353256 141.857467 254.837805 131.680909 249.21272 \n",
       "C 121.504351 243.587635 112.565931 235.967604 105.401411 226.809355 \n",
       "z\n",
       "\" style=\"fill: #2ca02c\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_5\">\n",
       "    <path d=\"M 259.340182 275.199869 \n",
       "C 265.513791 269.989204 271.200008 264.227105 276.328392 257.984982 \n",
       "C 281.456775 251.742859 286.006047 245.046589 289.919764 237.979247 \n",
       "L 249.179846 215.41851 \n",
       "C 246.63593 220.012283 243.678904 224.364858 240.345454 228.422238 \n",
       "C 237.012005 232.479618 233.315964 236.224982 229.303118 239.611915 \n",
       "z\n",
       "\" style=\"fill: #d62728\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_6\">\n",
       "    <path d=\"M 289.919764 237.979247 \n",
       "C 292.6667 233.018864 295.093757 227.887931 297.186065 222.617896 \n",
       "C 299.278372 217.347862 301.031656 211.949495 302.435218 206.45577 \n",
       "L 257.314891 194.92825 \n",
       "C 256.402577 198.499172 255.262942 202.00811 253.902942 205.433633 \n",
       "C 252.542942 208.859155 250.965355 212.194262 249.179846 215.41851 \n",
       "z\n",
       "\" style=\"fill: #9467bd\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_7\">\n",
       "    <path d=\"M 302.435218 206.45577 \n",
       "C 303.211845 203.415951 303.880709 200.349613 304.440557 197.262507 \n",
       "C 305.000405 194.175401 305.450887 191.069462 305.791157 187.950509 \n",
       "L 259.496252 182.899831 \n",
       "C 259.275077 184.92715 258.982263 186.946011 258.618362 188.95263 \n",
       "C 258.254461 190.959249 257.819699 192.952368 257.314891 194.92825 \n",
       "z\n",
       "\" style=\"fill: #8c564b\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_8\">\n",
       "    <path d=\"M 305.791157 187.950509 \n",
       "C 306.05253 185.554747 306.248761 183.152328 306.379642 180.745907 \n",
       "C 306.510524 178.339485 306.576 175.929954 306.576 173.519977 \n",
       "L 260.0064 173.519985 \n",
       "C 260.0064 175.08647 259.96384 176.652666 259.878768 178.216839 \n",
       "C 259.793695 179.781013 259.666145 181.342586 259.496252 182.899831 \n",
       "z\n",
       "\" style=\"fill: #e377c2\"/>\n",
       "   </g>\n",
       "   <g id=\"matplotlib.axis_1\"/>\n",
       "   <g id=\"matplotlib.axis_2\"/>\n",
       "   <g id=\"text_1\">\n",
       "    <!-- 北京 -->\n",
       "    <g transform=\"translate(254.363097 54.265252) scale(0.1 -0.1)\">\n",
       "     <defs>\n",
       "      <path id=\"MicrosoftYaHei-5317\" d=\"M 3763 5247 \n",
       "L 4269 5247 \n",
       "L 4269 3131 \n",
       "Q 5122 3569 5863 4091 \n",
       "L 6175 3641 \n",
       "Q 5500 3216 4269 2600 \n",
       "L 4269 303 \n",
       "Q 4269 -122 4738 -122 \n",
       "L 5175 -122 \n",
       "Q 5625 -122 5681 303 \n",
       "Q 5738 697 5781 1328 \n",
       "Q 6056 1216 6313 1128 \n",
       "Q 6250 534 6175 116 \n",
       "Q 6056 -597 5294 -597 \n",
       "L 4619 -597 \n",
       "Q 3763 -597 3763 247 \n",
       "L 3763 5247 \n",
       "z\n",
       "M 81 309 \n",
       "Q 897 591 2013 1047 \n",
       "L 2013 3016 \n",
       "L 213 3016 \n",
       "L 213 3478 \n",
       "L 2013 3478 \n",
       "L 2013 5234 \n",
       "L 2519 5234 \n",
       "L 2519 -772 \n",
       "L 2013 -772 \n",
       "L 2013 525 \n",
       "Q 1413 281 281 -184 \n",
       "L 81 309 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "      <path id=\"MicrosoftYaHei-4eac\" d=\"M 963 3459 \n",
       "L 5431 3459 \n",
       "L 5431 1347 \n",
       "L 4944 1347 \n",
       "L 4944 1597 \n",
       "L 3506 1597 \n",
       "L 3506 9 \n",
       "Q 3506 -731 2800 -741 \n",
       "Q 2350 -741 1981 -741 \n",
       "Q 1938 -472 1888 -234 \n",
       "Q 2306 -272 2613 -272 \n",
       "Q 3006 -284 3006 134 \n",
       "L 3006 1597 \n",
       "L 1450 1597 \n",
       "L 1450 1316 \n",
       "L 963 1316 \n",
       "L 963 3459 \n",
       "z\n",
       "M 4944 3028 \n",
       "L 1450 3028 \n",
       "L 1450 2028 \n",
       "L 4944 2028 \n",
       "L 4944 3028 \n",
       "z\n",
       "M 150 4453 \n",
       "L 3038 4453 \n",
       "Q 2859 4784 2631 5134 \n",
       "L 3088 5359 \n",
       "Q 3338 4984 3575 4584 \n",
       "L 3325 4453 \n",
       "L 6263 4453 \n",
       "L 6263 4016 \n",
       "L 150 4016 \n",
       "L 150 4453 \n",
       "z\n",
       "M 1756 1072 \n",
       "L 2100 697 \n",
       "Q 1263 66 419 -459 \n",
       "Q 300 -247 131 -41 \n",
       "Q 988 453 1756 1072 \n",
       "z\n",
       "M 4181 653 \n",
       "L 4475 1028 \n",
       "Q 5331 522 6119 3 \n",
       "L 5788 -428 \n",
       "Q 5125 66 4181 653 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "     </defs>\n",
       "     <use xlink:href=\"#MicrosoftYaHei-5317\"/>\n",
       "     <use xlink:href=\"#MicrosoftYaHei-4eac\" transform=\"translate(100 0)\"/>\n",
       "    </g>\n",
       "   </g>\n",
       "   <g id=\"text_2\">\n",
       "    <!-- 31.37% -->\n",
       "    <g transform=\"translate(214.934511 87.54034) scale(0.1 -0.1)\">\n",
       "     <defs>\n",
       "      <path id=\"MicrosoftYaHei-33\" d=\"M 447 809 \n",
       "Q 944 425 1569 425 \n",
       "Q 2069 425 2361 670 \n",
       "Q 2653 916 2653 1328 \n",
       "Q 2653 2247 1338 2247 \n",
       "L 934 2247 \n",
       "L 934 2753 \n",
       "L 1319 2753 \n",
       "Q 2484 2753 2484 3616 \n",
       "Q 2484 4413 1594 4413 \n",
       "Q 1084 4413 634 4069 \n",
       "L 634 4647 \n",
       "Q 1109 4922 1744 4922 \n",
       "Q 2363 4922 2738 4598 \n",
       "Q 3113 4275 3113 3759 \n",
       "Q 3113 2809 2144 2538 \n",
       "L 2144 2525 \n",
       "Q 2669 2469 2973 2155 \n",
       "Q 3278 1841 3278 1372 \n",
       "Q 3278 719 2808 319 \n",
       "Q 2338 -81 1556 -81 \n",
       "Q 869 -81 447 175 \n",
       "L 447 809 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "      <path id=\"MicrosoftYaHei-31\" d=\"M 1781 0 \n",
       "L 1781 4141 \n",
       "Q 1638 3997 1295 3819 \n",
       "Q 953 3641 663 3569 \n",
       "L 663 4169 \n",
       "Q 1047 4275 1484 4508 \n",
       "Q 1922 4741 2156 4947 \n",
       "L 2388 4947 \n",
       "L 2388 0 \n",
       "L 1781 0 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "      <path id=\"MicrosoftYaHei-2e\" d=\"M 372 322 \n",
       "Q 372 491 487 606 \n",
       "Q 603 722 775 722 \n",
       "Q 950 722 1065 605 \n",
       "Q 1181 488 1181 322 \n",
       "Q 1181 159 1065 42 \n",
       "Q 950 -75 772 -75 \n",
       "Q 600 -75 486 42 \n",
       "Q 372 159 372 322 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "      <path id=\"MicrosoftYaHei-37\" d=\"M 3422 4463 \n",
       "Q 2659 3131 2223 1998 \n",
       "Q 1788 866 1684 0 \n",
       "L 1047 0 \n",
       "Q 1163 853 1594 1947 \n",
       "Q 2025 3041 2747 4300 \n",
       "L 347 4300 \n",
       "L 347 4841 \n",
       "L 3422 4841 \n",
       "L 3422 4463 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "      <path id=\"MicrosoftYaHei-25\" d=\"M 272 3619 \n",
       "Q 272 4213 589 4563 \n",
       "Q 906 4913 1444 4913 \n",
       "Q 1959 4913 2248 4591 \n",
       "Q 2538 4269 2538 3694 \n",
       "Q 2538 3122 2219 2765 \n",
       "Q 1900 2409 1372 2409 \n",
       "Q 872 2409 572 2740 \n",
       "Q 272 3072 272 3619 \n",
       "z\n",
       "M 753 3650 \n",
       "Q 753 3247 928 3028 \n",
       "Q 1103 2809 1406 2809 \n",
       "Q 1719 2809 1889 3036 \n",
       "Q 2059 3263 2059 3675 \n",
       "Q 2059 4078 1892 4298 \n",
       "Q 1725 4519 1422 4519 \n",
       "Q 1113 4519 933 4289 \n",
       "Q 753 4059 753 3650 \n",
       "z\n",
       "M 4647 4841 \n",
       "L 1538 -31 \n",
       "L 1016 -31 \n",
       "L 4125 4841 \n",
       "L 4647 4841 \n",
       "z\n",
       "M 3172 1134 \n",
       "Q 3172 1728 3489 2083 \n",
       "Q 3806 2438 4341 2438 \n",
       "Q 4853 2438 5143 2114 \n",
       "Q 5434 1791 5434 1203 \n",
       "Q 5434 634 5112 279 \n",
       "Q 4791 -75 4272 -75 \n",
       "Q 3769 -75 3470 261 \n",
       "Q 3172 597 3172 1134 \n",
       "z\n",
       "M 3650 1163 \n",
       "Q 3650 769 3825 548 \n",
       "Q 4000 328 4303 328 \n",
       "Q 4616 328 4786 556 \n",
       "Q 4956 784 4956 1194 \n",
       "Q 4956 1600 4786 1815 \n",
       "Q 4616 2031 4319 2031 \n",
       "Q 4000 2031 3825 1801 \n",
       "Q 3650 1572 3650 1163 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "     </defs>\n",
       "     <use xlink:href=\"#MicrosoftYaHei-33\"/>\n",
       "     <use xlink:href=\"#MicrosoftYaHei-31\" transform=\"translate(58.642578 0)\"/>\n",
       "     <use xlink:href=\"#MicrosoftYaHei-2e\" transform=\"translate(117.285156 0)\"/>\n",
       "     <use xlink:href=\"#MicrosoftYaHei-33\" transform=\"translate(141.357422 0)\"/>\n",
       "     <use xlink:href=\"#MicrosoftYaHei-37\" transform=\"translate(200 0)\"/>\n",
       "     <use xlink:href=\"#MicrosoftYaHei-25\" transform=\"translate(258.642578 0)\"/>\n",
       "    </g>\n",
       "   </g>\n",
       "   <g id=\"text_3\">\n",
       "    <!-- 上海 -->\n",
       "    <g transform=\"translate(11.827028 139.602125) scale(0.1 -0.1)\">\n",
       "     <defs>\n",
       "      <path id=\"MicrosoftYaHei-4e0a\" d=\"M 163 47 \n",
       "L 2613 47 \n",
       "L 2613 5209 \n",
       "L 3181 5209 \n",
       "L 3181 3328 \n",
       "L 5750 3328 \n",
       "L 5750 2828 \n",
       "L 3181 2828 \n",
       "L 3181 47 \n",
       "L 6244 47 \n",
       "L 6244 -453 \n",
       "L 163 -453 \n",
       "L 163 47 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "      <path id=\"MicrosoftYaHei-6d77\" d=\"M 1475 2191 \n",
       "L 2116 2191 \n",
       "L 2338 3753 \n",
       "L 5706 3753 \n",
       "Q 5688 2884 5669 2191 \n",
       "L 6325 2191 \n",
       "L 6325 1753 \n",
       "L 5653 1753 \n",
       "Q 5634 1078 5616 603 \n",
       "L 6125 603 \n",
       "L 6125 178 \n",
       "L 5588 178 \n",
       "Q 5534 -281 5338 -509 \n",
       "Q 5113 -766 4538 -766 \n",
       "Q 4213 -766 3700 -741 \n",
       "Q 3669 -528 3613 -234 \n",
       "Q 4219 -291 4544 -291 \n",
       "Q 5016 -291 5106 178 \n",
       "L 1894 178 \n",
       "L 1894 641 \n",
       "L 2053 1753 \n",
       "L 1475 1753 \n",
       "L 1475 2191 \n",
       "z\n",
       "M 5184 1753 \n",
       "L 2541 1753 \n",
       "L 2388 603 \n",
       "L 5141 603 \n",
       "Q 5166 1116 5184 1753 \n",
       "z\n",
       "M 5225 3328 \n",
       "L 2750 3328 \n",
       "L 2597 2191 \n",
       "L 5197 2191 \n",
       "Q 5213 2722 5225 3328 \n",
       "z\n",
       "M 1425 3553 \n",
       "Q 2200 4284 2675 5347 \n",
       "L 3206 5347 \n",
       "Q 3056 5022 2891 4728 \n",
       "L 6194 4728 \n",
       "L 6194 4291 \n",
       "L 2628 4291 \n",
       "Q 2225 3663 1744 3184 \n",
       "Q 1600 3372 1425 3553 \n",
       "z\n",
       "M 275 -653 \n",
       "Q 644 441 913 1741 \n",
       "Q 1188 1622 1419 1547 \n",
       "Q 1100 322 825 -822 \n",
       "L 275 -653 \n",
       "z\n",
       "M 88 3253 \n",
       "L 400 3609 \n",
       "Q 975 3209 1469 2803 \n",
       "Q 1244 2547 1106 2403 \n",
       "Q 550 2903 88 3253 \n",
       "z\n",
       "M 325 4916 \n",
       "L 644 5247 \n",
       "Q 1019 4959 1688 4378 \n",
       "Q 1475 4172 1319 4009 \n",
       "Q 644 4653 325 4916 \n",
       "z\n",
       "M 3288 1372 \n",
       "L 3575 1653 \n",
       "Q 3994 1334 4356 1009 \n",
       "L 4031 684 \n",
       "Q 3663 1041 3288 1372 \n",
       "z\n",
       "M 3369 2972 \n",
       "L 3650 3253 \n",
       "Q 4050 2947 4438 2616 \n",
       "L 4119 2291 \n",
       "Q 3738 2666 3369 2972 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "     </defs>\n",
       "     <use xlink:href=\"#MicrosoftYaHei-4e0a\"/>\n",
       "     <use xlink:href=\"#MicrosoftYaHei-6d77\" transform=\"translate(100 0)\"/>\n",
       "    </g>\n",
       "   </g>\n",
       "   <g id=\"text_4\">\n",
       "    <!-- 29.19% -->\n",
       "    <g transform=\"translate(53.090097 149.60352) scale(0.1 -0.1)\">\n",
       "     <defs>\n",
       "      <path id=\"MicrosoftYaHei-32\" d=\"M 2666 3572 \n",
       "Q 2666 3963 2419 4186 \n",
       "Q 2172 4409 1747 4409 \n",
       "Q 1447 4409 1140 4256 \n",
       "Q 834 4103 569 3819 \n",
       "L 569 4413 \n",
       "Q 806 4659 1107 4790 \n",
       "Q 1409 4922 1816 4922 \n",
       "Q 2472 4922 2872 4570 \n",
       "Q 3272 4219 3272 3619 \n",
       "Q 3272 3084 3026 2693 \n",
       "Q 2781 2303 2188 1894 \n",
       "Q 1581 1475 1376 1294 \n",
       "Q 1172 1113 1090 947 \n",
       "Q 1009 781 1009 544 \n",
       "L 3416 544 \n",
       "L 3416 0 \n",
       "L 372 0 \n",
       "L 372 241 \n",
       "Q 372 659 486 951 \n",
       "Q 600 1244 862 1520 \n",
       "Q 1125 1797 1681 2184 \n",
       "Q 2250 2584 2458 2886 \n",
       "Q 2666 3188 2666 3572 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "      <path id=\"MicrosoftYaHei-39\" d=\"M 578 656 \n",
       "Q 978 425 1441 425 \n",
       "Q 2091 425 2448 937 \n",
       "Q 2806 1450 2806 2394 \n",
       "Q 2800 2388 2794 2394 \n",
       "Q 2475 1788 1722 1788 \n",
       "Q 1113 1788 713 2206 \n",
       "Q 313 2625 313 3294 \n",
       "Q 313 4006 750 4464 \n",
       "Q 1188 4922 1884 4922 \n",
       "Q 2606 4922 3012 4355 \n",
       "Q 3419 3788 3419 2703 \n",
       "Q 3419 1363 2894 641 \n",
       "Q 2369 -81 1441 -81 \n",
       "Q 931 -81 578 84 \n",
       "L 578 656 \n",
       "z\n",
       "M 931 3372 \n",
       "Q 931 2884 1181 2598 \n",
       "Q 1431 2313 1872 2313 \n",
       "Q 2253 2313 2512 2573 \n",
       "Q 2772 2834 2772 3206 \n",
       "Q 2772 3728 2514 4070 \n",
       "Q 2256 4413 1834 4413 \n",
       "Q 1444 4413 1187 4116 \n",
       "Q 931 3819 931 3372 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "     </defs>\n",
       "     <use xlink:href=\"#MicrosoftYaHei-32\"/>\n",
       "     <use xlink:href=\"#MicrosoftYaHei-39\" transform=\"translate(58.642578 0)\"/>\n",
       "     <use xlink:href=\"#MicrosoftYaHei-2e\" transform=\"translate(117.285156 0)\"/>\n",
       "     <use xlink:href=\"#MicrosoftYaHei-31\" transform=\"translate(141.357422 0)\"/>\n",
       "     <use xlink:href=\"#MicrosoftYaHei-39\" transform=\"translate(200 0)\"/>\n",
       "     <use xlink:href=\"#MicrosoftYaHei-25\" transform=\"translate(258.642578 0)\"/>\n",
       "    </g>\n",
       "   </g>\n",
       "   <g id=\"text_5\">\n",
       "    <!-- 福建 -->\n",
       "    <g transform=\"translate(138.476859 321.860382) scale(0.1 -0.1)\">\n",
       "     <defs>\n",
       "      <path id=\"MicrosoftYaHei-798f\" d=\"M 2338 2166 \n",
       "L 5988 2166 \n",
       "L 5988 -778 \n",
       "L 5538 -778 \n",
       "L 5538 -466 \n",
       "L 2788 -466 \n",
       "L 2788 -778 \n",
       "L 2338 -778 \n",
       "L 2338 2166 \n",
       "z\n",
       "M 2631 4147 \n",
       "L 5681 4147 \n",
       "L 5681 2484 \n",
       "L 5231 2484 \n",
       "L 5231 2703 \n",
       "L 3081 2703 \n",
       "L 3081 2484 \n",
       "L 2631 2484 \n",
       "L 2631 4147 \n",
       "z\n",
       "M 175 3647 \n",
       "L 175 4103 \n",
       "L 2175 4103 \n",
       "L 2175 3634 \n",
       "Q 1853 3016 1419 2459 \n",
       "L 1419 2172 \n",
       "L 1725 2409 \n",
       "Q 1938 2159 2244 1728 \n",
       "L 1888 1447 \n",
       "Q 1628 1847 1419 2134 \n",
       "L 1419 -772 \n",
       "L 969 -772 \n",
       "L 969 1928 \n",
       "Q 638 1572 256 1241 \n",
       "Q 156 1691 94 1791 \n",
       "Q 1144 2609 1625 3647 \n",
       "L 175 3647 \n",
       "z\n",
       "M 2313 5022 \n",
       "L 6088 5022 \n",
       "L 6088 4622 \n",
       "L 2313 4622 \n",
       "L 2313 5022 \n",
       "z\n",
       "M 5231 3772 \n",
       "L 3081 3772 \n",
       "L 3081 3078 \n",
       "L 5231 3078 \n",
       "L 5231 3772 \n",
       "z\n",
       "M 4381 -78 \n",
       "L 5538 -78 \n",
       "L 5538 659 \n",
       "L 4381 659 \n",
       "L 4381 -78 \n",
       "z\n",
       "M 5538 1778 \n",
       "L 4381 1778 \n",
       "L 4381 1047 \n",
       "L 5538 1047 \n",
       "L 5538 1778 \n",
       "z\n",
       "M 2788 -78 \n",
       "L 3931 -78 \n",
       "L 3931 659 \n",
       "L 2788 659 \n",
       "L 2788 -78 \n",
       "z\n",
       "M 2788 1047 \n",
       "L 3931 1047 \n",
       "L 3931 1778 \n",
       "L 2788 1778 \n",
       "L 2788 1047 \n",
       "z\n",
       "M 731 5141 \n",
       "L 1175 5359 \n",
       "Q 1356 5072 1681 4497 \n",
       "L 1206 4259 \n",
       "Q 938 4809 731 5141 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "      <path id=\"MicrosoftYaHei-5efa\" d=\"M 2075 1009 \n",
       "L 3675 1009 \n",
       "L 3675 1553 \n",
       "L 2288 1553 \n",
       "L 2288 1928 \n",
       "L 3675 1928 \n",
       "L 3675 2472 \n",
       "L 2375 2472 \n",
       "L 2375 2847 \n",
       "L 3675 2847 \n",
       "L 3675 3391 \n",
       "L 2050 3391 \n",
       "L 2050 3778 \n",
       "L 3675 3778 \n",
       "L 3675 4322 \n",
       "L 2375 4322 \n",
       "L 2375 4697 \n",
       "L 3675 4697 \n",
       "L 3675 5309 \n",
       "L 4138 5309 \n",
       "L 4138 4697 \n",
       "L 5588 4697 \n",
       "L 5588 3778 \n",
       "L 6244 3778 \n",
       "L 6244 3391 \n",
       "L 5588 3391 \n",
       "L 5588 2303 \n",
       "L 5138 2303 \n",
       "L 5138 2472 \n",
       "L 4138 2472 \n",
       "L 4138 1928 \n",
       "L 5713 1928 \n",
       "L 5713 1553 \n",
       "L 4138 1553 \n",
       "L 4138 1009 \n",
       "L 6000 1009 \n",
       "L 6000 634 \n",
       "L 4138 634 \n",
       "L 4138 -9 \n",
       "L 3675 -9 \n",
       "L 3675 634 \n",
       "L 2075 634 \n",
       "L 2075 1009 \n",
       "z\n",
       "M 600 2066 \n",
       "Q 788 1303 1125 813 \n",
       "Q 1459 1500 1544 2397 \n",
       "L 294 2397 \n",
       "L 294 2853 \n",
       "L 1444 4272 \n",
       "L 169 4272 \n",
       "L 169 4697 \n",
       "L 2019 4697 \n",
       "L 2019 4272 \n",
       "L 844 2822 \n",
       "L 2013 2822 \n",
       "L 2013 2453 \n",
       "Q 1897 1294 1447 444 \n",
       "Q 2128 -147 3563 -153 \n",
       "Q 4750 -178 6319 -122 \n",
       "Q 6213 -378 6113 -616 \n",
       "Q 4681 -609 3344 -603 \n",
       "Q 1950 -603 1206 47 \n",
       "Q 853 -466 350 -847 \n",
       "Q 250 -666 94 -441 \n",
       "Q 563 -84 881 391 \n",
       "Q 463 922 188 1909 \n",
       "L 600 2066 \n",
       "z\n",
       "M 4138 2847 \n",
       "L 5138 2847 \n",
       "L 5138 3391 \n",
       "L 4138 3391 \n",
       "L 4138 2847 \n",
       "z\n",
       "M 5138 4322 \n",
       "L 4138 4322 \n",
       "L 4138 3778 \n",
       "L 5138 3778 \n",
       "L 5138 4322 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "     </defs>\n",
       "     <use xlink:href=\"#MicrosoftYaHei-798f\"/>\n",
       "     <use xlink:href=\"#MicrosoftYaHei-5efa\" transform=\"translate(100 0)\"/>\n",
       "    </g>\n",
       "   </g>\n",
       "   <g id=\"text_6\">\n",
       "    <!-- 25.59% -->\n",
       "    <g transform=\"translate(145.199065 282.154979) scale(0.1 -0.1)\">\n",
       "     <defs>\n",
       "      <path id=\"MicrosoftYaHei-35\" d=\"M 3294 1494 \n",
       "Q 3294 784 2823 350 \n",
       "Q 2353 -84 1559 -84 \n",
       "Q 878 -84 544 119 \n",
       "L 544 744 \n",
       "Q 1034 425 1544 425 \n",
       "Q 2050 425 2361 704 \n",
       "Q 2672 984 2672 1447 \n",
       "Q 2672 1909 2348 2167 \n",
       "Q 2025 2425 1434 2425 \n",
       "Q 978 2425 613 2384 \n",
       "L 791 4841 \n",
       "L 3053 4841 \n",
       "L 3053 4303 \n",
       "L 1306 4303 \n",
       "L 1206 2931 \n",
       "L 1647 2950 \n",
       "Q 2416 2950 2855 2567 \n",
       "Q 3294 2184 3294 1494 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "     </defs>\n",
       "     <use xlink:href=\"#MicrosoftYaHei-32\"/>\n",
       "     <use xlink:href=\"#MicrosoftYaHei-35\" transform=\"translate(58.642578 0)\"/>\n",
       "     <use xlink:href=\"#MicrosoftYaHei-2e\" transform=\"translate(117.285156 0)\"/>\n",
       "     <use xlink:href=\"#MicrosoftYaHei-35\" transform=\"translate(141.357422 0)\"/>\n",
       "     <use xlink:href=\"#MicrosoftYaHei-39\" transform=\"translate(200 0)\"/>\n",
       "     <use xlink:href=\"#MicrosoftYaHei-25\" transform=\"translate(258.642578 0)\"/>\n",
       "    </g>\n",
       "   </g>\n",
       "   <g id=\"text_7\">\n",
       "    <!-- 江苏 -->\n",
       "    <g transform=\"translate(286.609278 269.185332) scale(0.1 -0.1)\">\n",
       "     <defs>\n",
       "      <path id=\"MicrosoftYaHei-6c5f\" d=\"M 1781 97 \n",
       "L 3781 97 \n",
       "L 3781 4228 \n",
       "L 2156 4228 \n",
       "L 2156 4691 \n",
       "L 6038 4691 \n",
       "L 6038 4228 \n",
       "L 4306 4228 \n",
       "L 4306 97 \n",
       "L 6313 97 \n",
       "L 6313 -366 \n",
       "L 1781 -366 \n",
       "L 1781 97 \n",
       "z\n",
       "M 1169 1803 \n",
       "Q 1419 1641 1681 1509 \n",
       "Q 1231 391 800 -816 \n",
       "L 269 -516 \n",
       "Q 763 522 1169 1803 \n",
       "z\n",
       "M 394 3616 \n",
       "Q 1031 3228 1650 2772 \n",
       "L 1300 2316 \n",
       "Q 675 2828 94 3209 \n",
       "L 394 3616 \n",
       "z\n",
       "M 713 5209 \n",
       "Q 1294 4816 1919 4316 \n",
       "L 1581 3891 \n",
       "Q 994 4416 406 4847 \n",
       "L 713 5209 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "      <path id=\"MicrosoftYaHei-82cf\" d=\"M 550 3041 \n",
       "L 2447 3041 \n",
       "Q 2466 3372 2463 3741 \n",
       "L 2981 3741 \n",
       "Q 2975 3372 2953 3041 \n",
       "L 5075 3041 \n",
       "Q 5050 1228 4981 366 \n",
       "Q 4881 -684 3856 -684 \n",
       "Q 3306 -684 2738 -659 \n",
       "Q 2713 -422 2650 -78 \n",
       "L 2669 -78 \n",
       "Q 3338 -153 3800 -153 \n",
       "Q 4406 -153 4481 509 \n",
       "Q 4544 1328 4550 2547 \n",
       "L 2909 2547 \n",
       "Q 2788 153 581 -872 \n",
       "Q 431 -647 263 -441 \n",
       "Q 2213 391 2406 2547 \n",
       "L 550 2547 \n",
       "L 550 3041 \n",
       "z\n",
       "M 4175 5328 \n",
       "L 4675 5328 \n",
       "L 4675 4591 \n",
       "L 6256 4591 \n",
       "L 6256 4147 \n",
       "L 4675 4147 \n",
       "L 4675 3553 \n",
       "L 4175 3553 \n",
       "L 4175 4147 \n",
       "L 2244 4147 \n",
       "L 2244 3553 \n",
       "L 1756 3553 \n",
       "L 1756 4147 \n",
       "L 138 4147 \n",
       "L 138 4591 \n",
       "L 1756 4591 \n",
       "L 1756 5328 \n",
       "L 2244 5328 \n",
       "L 2244 4591 \n",
       "L 4175 4591 \n",
       "L 4175 5328 \n",
       "z\n",
       "M 5156 2122 \n",
       "L 5663 2316 \n",
       "Q 6031 1553 6344 653 \n",
       "L 5844 447 \n",
       "Q 5494 1397 5156 2122 \n",
       "z\n",
       "M 1056 2266 \n",
       "L 1494 2003 \n",
       "Q 1050 1191 481 428 \n",
       "Q 306 566 75 734 \n",
       "Q 631 1478 1056 2266 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "     </defs>\n",
       "     <use xlink:href=\"#MicrosoftYaHei-6c5f\"/>\n",
       "     <use xlink:href=\"#MicrosoftYaHei-82cf\" transform=\"translate(100 0)\"/>\n",
       "    </g>\n",
       "   </g>\n",
       "   <g id=\"text_8\">\n",
       "    <!-- 5.79% -->\n",
       "    <g transform=\"translate(241.31831 243.845853) scale(0.1 -0.1)\">\n",
       "     <use xlink:href=\"#MicrosoftYaHei-35\"/>\n",
       "     <use xlink:href=\"#MicrosoftYaHei-2e\" transform=\"translate(58.642578 0)\"/>\n",
       "     <use xlink:href=\"#MicrosoftYaHei-37\" transform=\"translate(82.714844 0)\"/>\n",
       "     <use xlink:href=\"#MicrosoftYaHei-39\" transform=\"translate(141.357422 0)\"/>\n",
       "     <use xlink:href=\"#MicrosoftYaHei-25\" transform=\"translate(200 0)\"/>\n",
       "    </g>\n",
       "   </g>\n",
       "   <g id=\"text_9\">\n",
       "    <!-- 广东 -->\n",
       "    <g transform=\"translate(309.552671 230.281595) scale(0.1 -0.1)\">\n",
       "     <defs>\n",
       "      <path id=\"MicrosoftYaHei-5e7f\" d=\"M 975 4384 \n",
       "L 3466 4384 \n",
       "Q 3291 4684 3000 5097 \n",
       "L 3456 5359 \n",
       "Q 3763 4966 4000 4591 \n",
       "L 3650 4384 \n",
       "L 6213 4384 \n",
       "L 6213 3878 \n",
       "L 1531 3878 \n",
       "L 1531 2328 \n",
       "Q 1538 366 513 -797 \n",
       "Q 369 -641 63 -403 \n",
       "Q 975 591 975 2391 \n",
       "L 975 4384 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "      <path id=\"MicrosoftYaHei-4e1c\" d=\"M 706 1884 \n",
       "L 706 2359 \n",
       "L 1422 4022 \n",
       "L 194 4022 \n",
       "L 194 4497 \n",
       "L 1625 4497 \n",
       "L 1994 5353 \n",
       "L 2531 5241 \n",
       "L 2206 4497 \n",
       "L 6206 4497 \n",
       "L 6206 4022 \n",
       "L 2000 4022 \n",
       "L 1275 2359 \n",
       "L 3156 2359 \n",
       "L 3156 3728 \n",
       "L 3681 3728 \n",
       "L 3681 2359 \n",
       "L 5913 2359 \n",
       "L 5913 1884 \n",
       "L 3681 1884 \n",
       "L 3681 41 \n",
       "Q 3681 -741 2869 -741 \n",
       "Q 2456 -741 1931 -734 \n",
       "Q 1894 -491 1838 -172 \n",
       "Q 2250 -225 2725 -228 \n",
       "Q 3156 -231 3156 216 \n",
       "L 3156 1884 \n",
       "L 706 1884 \n",
       "z\n",
       "M 1619 1509 \n",
       "L 2038 1191 \n",
       "Q 1325 353 413 -534 \n",
       "Q 250 -359 56 -184 \n",
       "Q 888 603 1619 1509 \n",
       "z\n",
       "M 4288 1091 \n",
       "L 4638 1434 \n",
       "Q 5500 722 6363 -59 \n",
       "L 5975 -453 \n",
       "Q 5119 391 4288 1091 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "     </defs>\n",
       "     <use xlink:href=\"#MicrosoftYaHei-5e7f\"/>\n",
       "     <use xlink:href=\"#MicrosoftYaHei-4e1c\" transform=\"translate(100 0)\"/>\n",
       "    </g>\n",
       "   </g>\n",
       "   <g id=\"text_10\">\n",
       "    <!-- 4.07% -->\n",
       "    <g transform=\"translate(258.004414 215.552225) scale(0.1 -0.1)\">\n",
       "     <defs>\n",
       "      <path id=\"MicrosoftYaHei-34\" d=\"M 2906 4841 \n",
       "L 2906 1644 \n",
       "L 3631 1644 \n",
       "L 3631 1138 \n",
       "L 2906 1138 \n",
       "L 2906 0 \n",
       "L 2313 0 \n",
       "L 2313 1138 \n",
       "L 53 1138 \n",
       "L 53 1616 \n",
       "Q 656 2294 1265 3178 \n",
       "Q 1875 4063 2272 4841 \n",
       "L 2906 4841 \n",
       "z\n",
       "M 741 1644 \n",
       "L 2313 1644 \n",
       "L 2313 3950 \n",
       "Q 1988 3366 1616 2817 \n",
       "Q 1244 2269 741 1644 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "      <path id=\"MicrosoftYaHei-30\" d=\"M 284 2325 \n",
       "Q 284 3606 709 4264 \n",
       "Q 1134 4922 1941 4922 \n",
       "Q 3478 4922 3478 2441 \n",
       "Q 3478 1216 3045 567 \n",
       "Q 2613 -81 1831 -81 \n",
       "Q 1094 -81 689 534 \n",
       "Q 284 1150 284 2325 \n",
       "z\n",
       "M 909 2353 \n",
       "Q 909 425 1888 425 \n",
       "Q 2850 425 2850 2384 \n",
       "Q 2850 4413 1906 4413 \n",
       "Q 909 4413 909 2353 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "     </defs>\n",
       "     <use xlink:href=\"#MicrosoftYaHei-34\"/>\n",
       "     <use xlink:href=\"#MicrosoftYaHei-2e\" transform=\"translate(58.642578 0)\"/>\n",
       "     <use xlink:href=\"#MicrosoftYaHei-30\" transform=\"translate(82.714844 0)\"/>\n",
       "     <use xlink:href=\"#MicrosoftYaHei-37\" transform=\"translate(141.357422 0)\"/>\n",
       "     <use xlink:href=\"#MicrosoftYaHei-25\" transform=\"translate(200 0)\"/>\n",
       "    </g>\n",
       "   </g>\n",
       "   <g id=\"text_11\">\n",
       "    <!-- 安徽 -->\n",
       "    <g transform=\"translate(317.532613 202.390666) scale(0.1 -0.1)\">\n",
       "     <defs>\n",
       "      <path id=\"MicrosoftYaHei-5b89\" d=\"M 325 -322 \n",
       "Q 1894 -81 2888 478 \n",
       "Q 2072 859 1163 1266 \n",
       "Q 1459 1709 1747 2191 \n",
       "L 106 2191 \n",
       "L 106 2653 \n",
       "L 2019 2653 \n",
       "Q 2334 3206 2644 3803 \n",
       "L 3138 3597 \n",
       "Q 2863 3113 2597 2653 \n",
       "L 6306 2653 \n",
       "L 6306 2191 \n",
       "L 4966 2191 \n",
       "Q 4653 1244 3888 572 \n",
       "Q 4872 128 5850 -328 \n",
       "L 5544 -828 \n",
       "Q 4591 -328 3434 219 \n",
       "Q 2347 -513 588 -834 \n",
       "Q 475 -597 325 -322 \n",
       "z\n",
       "M 413 4397 \n",
       "L 3228 4397 \n",
       "Q 2991 4741 2681 5103 \n",
       "L 3100 5384 \n",
       "Q 3481 4972 3744 4591 \n",
       "L 3456 4397 \n",
       "L 6013 4397 \n",
       "L 6013 3209 \n",
       "L 5506 3209 \n",
       "L 5506 3934 \n",
       "L 913 3934 \n",
       "L 913 3209 \n",
       "L 413 3209 \n",
       "L 413 4397 \n",
       "z\n",
       "M 1881 1453 \n",
       "Q 2631 1131 3375 800 \n",
       "Q 4122 1369 4422 2191 \n",
       "L 2325 2191 \n",
       "Q 2100 1813 1881 1453 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "      <path id=\"MicrosoftYaHei-5fbd\" d=\"M 4850 5303 \n",
       "L 5263 5234 \n",
       "Q 5163 4650 5022 4122 \n",
       "L 6313 4122 \n",
       "L 6313 3716 \n",
       "L 6016 3716 \n",
       "Q 5884 1847 5438 819 \n",
       "Q 5788 113 6338 -378 \n",
       "Q 6175 -628 6063 -822 \n",
       "Q 5544 -297 5200 356 \n",
       "Q 4828 -278 4225 -872 \n",
       "Q 4106 -691 3938 -484 \n",
       "Q 4609 163 4978 844 \n",
       "Q 4628 1719 4556 2791 \n",
       "Q 4419 2478 4263 2197 \n",
       "Q 4144 2397 4006 2584 \n",
       "Q 4594 3653 4850 5303 \n",
       "z\n",
       "M 2206 2216 \n",
       "Q 2481 2216 3066 2238 \n",
       "Q 3316 2472 3519 2709 \n",
       "L 3881 2459 \n",
       "Q 3044 1703 2331 1234 \n",
       "Q 3056 1263 3653 1294 \n",
       "Q 3547 1466 3438 1628 \n",
       "L 3769 1809 \n",
       "Q 4075 1384 4356 891 \n",
       "L 4006 678 \n",
       "Q 3928 825 3847 969 \n",
       "Q 3516 950 3181 928 \n",
       "L 3181 -103 \n",
       "Q 3181 -741 2600 -741 \n",
       "Q 2375 -741 2069 -734 \n",
       "Q 2044 -572 1988 -291 \n",
       "Q 2256 -328 2469 -328 \n",
       "Q 2756 -328 2769 3 \n",
       "L 2769 900 \n",
       "Q 2409 878 2044 853 \n",
       "Q 1913 847 1713 809 \n",
       "L 1556 1191 \n",
       "Q 1744 1253 1838 1309 \n",
       "Q 2300 1603 2678 1906 \n",
       "Q 2350 1891 2013 1859 \n",
       "Q 1938 1853 1731 1809 \n",
       "L 1563 2197 \n",
       "Q 1725 2241 1863 2359 \n",
       "Q 2144 2588 2456 2934 \n",
       "L 1725 2934 \n",
       "L 1725 3297 \n",
       "L 4100 3297 \n",
       "L 4100 2934 \n",
       "L 2991 2934 \n",
       "Q 2538 2491 2206 2216 \n",
       "z\n",
       "M 50 1653 \n",
       "Q 694 2372 1288 3647 \n",
       "L 1663 3453 \n",
       "Q 1413 2959 1181 2547 \n",
       "L 1181 -841 \n",
       "L 756 -841 \n",
       "L 756 1844 \n",
       "Q 494 1441 250 1153 \n",
       "Q 163 1397 50 1653 \n",
       "z\n",
       "M 1819 3697 \n",
       "L 1819 4909 \n",
       "L 2219 4909 \n",
       "L 2219 4059 \n",
       "L 2756 4059 \n",
       "L 2756 5278 \n",
       "L 3156 5278 \n",
       "L 3156 4059 \n",
       "L 3694 4059 \n",
       "L 3694 4909 \n",
       "L 4094 4909 \n",
       "L 4094 3509 \n",
       "L 3694 3509 \n",
       "L 3694 3697 \n",
       "L 1819 3697 \n",
       "z\n",
       "M 5209 1369 \n",
       "Q 5497 2188 5603 3716 \n",
       "L 4903 3716 \n",
       "Q 4875 3619 4844 3525 \n",
       "Q 4888 2297 5209 1369 \n",
       "z\n",
       "M 50 3584 \n",
       "Q 788 4322 1288 5297 \n",
       "L 1675 5078 \n",
       "Q 1031 3934 275 3159 \n",
       "Q 175 3384 50 3584 \n",
       "z\n",
       "M 1944 703 \n",
       "L 2306 516 \n",
       "Q 2019 -3 1719 -434 \n",
       "Q 1581 -328 1381 -209 \n",
       "Q 1688 191 1944 703 \n",
       "z\n",
       "M 3419 491 \n",
       "L 3725 722 \n",
       "Q 4000 409 4275 41 \n",
       "L 3950 -209 \n",
       "Q 3656 216 3419 491 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "     </defs>\n",
       "     <use xlink:href=\"#MicrosoftYaHei-5b89\"/>\n",
       "     <use xlink:href=\"#MicrosoftYaHei-5fbd\" transform=\"translate(100 0)\"/>\n",
       "    </g>\n",
       "   </g>\n",
       "   <g id=\"text_12\">\n",
       "    <!-- 2.25% -->\n",
       "    <g transform=\"translate(263.808009 195.267913) scale(0.1 -0.1)\">\n",
       "     <use xlink:href=\"#MicrosoftYaHei-32\"/>\n",
       "     <use xlink:href=\"#MicrosoftYaHei-2e\" transform=\"translate(58.642578 0)\"/>\n",
       "     <use xlink:href=\"#MicrosoftYaHei-32\" transform=\"translate(82.714844 0)\"/>\n",
       "     <use xlink:href=\"#MicrosoftYaHei-35\" transform=\"translate(141.357422 0)\"/>\n",
       "     <use xlink:href=\"#MicrosoftYaHei-25\" transform=\"translate(200 0)\"/>\n",
       "    </g>\n",
       "   </g>\n",
       "   <g id=\"text_13\">\n",
       "    <!-- 浙江 -->\n",
       "    <g transform=\"translate(319.66561 184.222404) scale(0.1 -0.1)\">\n",
       "     <defs>\n",
       "      <path id=\"MicrosoftYaHei-6d59\" d=\"M 3700 4834 \n",
       "Q 5125 4859 6050 5066 \n",
       "L 6194 4603 \n",
       "Q 5300 4466 4163 4409 \n",
       "L 4163 2972 \n",
       "L 6263 2972 \n",
       "L 6263 2522 \n",
       "L 5538 2522 \n",
       "L 5538 -878 \n",
       "L 5081 -878 \n",
       "L 5081 2522 \n",
       "L 4163 2522 \n",
       "Q 4163 178 3419 -884 \n",
       "Q 3200 -722 2988 -597 \n",
       "Q 3700 284 3700 2284 \n",
       "L 3700 4834 \n",
       "z\n",
       "M 1438 1966 \n",
       "Q 1863 2084 2269 2203 \n",
       "L 2269 3647 \n",
       "L 1525 3647 \n",
       "L 1525 4084 \n",
       "L 2269 4084 \n",
       "L 2269 5266 \n",
       "L 2731 5266 \n",
       "L 2731 4084 \n",
       "L 3463 4084 \n",
       "L 3463 3647 \n",
       "L 2731 3647 \n",
       "L 2731 2347 \n",
       "Q 3088 2459 3431 2572 \n",
       "Q 3438 2291 3469 2084 \n",
       "Q 3081 1959 2731 1847 \n",
       "L 2731 -166 \n",
       "Q 2731 -759 2075 -772 \n",
       "Q 1806 -772 1394 -766 \n",
       "Q 1363 -503 1313 -253 \n",
       "Q 1800 -291 2019 -291 \n",
       "Q 2269 -291 2269 -34 \n",
       "L 2269 1691 \n",
       "Q 1850 1553 1500 1428 \n",
       "L 1438 1966 \n",
       "z\n",
       "M 913 1753 \n",
       "Q 1175 1616 1406 1522 \n",
       "Q 1038 203 781 -797 \n",
       "L 269 -559 \n",
       "Q 644 491 913 1753 \n",
       "z\n",
       "M 388 3553 \n",
       "Q 919 3134 1406 2709 \n",
       "L 1038 2316 \n",
       "Q 650 2697 75 3209 \n",
       "L 388 3553 \n",
       "z\n",
       "M 675 5159 \n",
       "Q 1175 4759 1650 4322 \n",
       "L 1281 3953 \n",
       "Q 850 4416 356 4853 \n",
       "L 675 5159 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "     </defs>\n",
       "     <use xlink:href=\"#MicrosoftYaHei-6d59\"/>\n",
       "     <use xlink:href=\"#MicrosoftYaHei-6c5f\" transform=\"translate(100 0)\"/>\n",
       "    </g>\n",
       "   </g>\n",
       "   <g id=\"text_14\">\n",
       "    <!-- 1.73% -->\n",
       "    <g transform=\"translate(265.359279 182.054632) scale(0.1 -0.1)\">\n",
       "     <use xlink:href=\"#MicrosoftYaHei-31\"/>\n",
       "     <use xlink:href=\"#MicrosoftYaHei-2e\" transform=\"translate(58.642578 0)\"/>\n",
       "     <use xlink:href=\"#MicrosoftYaHei-37\" transform=\"translate(82.714844 0)\"/>\n",
       "     <use xlink:href=\"#MicrosoftYaHei-33\" transform=\"translate(141.357422 0)\"/>\n",
       "     <use xlink:href=\"#MicrosoftYaHei-25\" transform=\"translate(200 0)\"/>\n",
       "    </g>\n",
       "   </g>\n",
       "  </g>\n",
       " </g>\n",
       "</svg>\n"
      ],
      "text/plain": [
       "<Figure size 600x600 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "temp.sort_values(by='销售额', ascending=False).plot(\n",
    "    figsize=(6, 6),\n",
    "    kind='pie',\n",
    "    y='销售额',\n",
    "    ylabel='',\n",
    "    autopct='%.2f%%',\n",
    "    pctdistance=0.8,\n",
    "    wedgeprops=dict(linewidth=1, width=0.35),\n",
    "    legend=False\n",
    ")\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "1e859157-f50f-4776-9719-0667d54bcee6",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.13.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
